note 72974 deleted from ref.array by felipe
| From: | felipe@php.net | Date: | Sun, 30 Dec 2007 19:28:02 +0000 |
| Subject: | note 72974 deleted from ref.array by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134519@lists.php.net to get a copy of this message | ||
Note Submitter: hannes dot dahlberg at gmail dot com
----
A small function to get the median of an array filled with numbers
function median($array)
{
sort($array);
return ($array[ceil((count($array) / 2)) - 1] + $array[floor((count($array) / 2))]) / 2;
}