//Need to get the mid point of array. Use Floor because we always want to round down. $mid = floor($count/2); //If there are an even amount of elements... if (($count ...
-- when num % 2 = 0, the r of the median is num/2 and num/2 + 1 -- when num % 2 = 1, the r of the median is (num+1)/2, between num/2 and num/2 + 1 ...
-- when num % 2 = 0, the r of the median is num/2 and num/2 + 1 -- when num % 2 = 1, the r of the median is (num+1)/2, between num/2 and num/2 + 1 ...