Needing to calculate an array’s (composed of numeric values) average, I used the following function:
1 2 3 4 function array_average($a) { return array_sum($a) / sizeof($a); }
|
|||||
|
Needing to calculate an array’s (composed of numeric values) average, I used the following function: 1 2 3 4 function array_average($a) { return array_sum($a) / sizeof($a); } |
|||||
|
Copyright © 2012 Need code for … - All Rights Reserved |
|||||
Recent Comments