To find the median of a list of numbers in PHP, you can follow these steps:
sort()
function in PHP.count()
function.count($array)/2
.(count($array)/2)-1
and count($array)/2
and then dividing their sum by 2.Here's the code snippet:
main.php362 chars16 lines
gistlibby LogSnag