function median($a) { // Work your magic here. Make sure you're calculating the median, NOT the mean! return array_sum($a)/count($a);}
来源: http://www.bubuko.com/infodetail-2760844.html