$input = array(1,1,2,3,2,1,1);
$c = array_count_values($input);
$val = array_search(max($c), $c)
$count =
This returns 1 as expected (most common). How would I find out how many times it occurs in the array? There are many similar questions, but none of them were interested in finding the count.
echo $val. "ccours". $count . "times";
return array($val => $c[$val]);