Below code helps you to get number of time a value occur in given array it will product how many time a values repeat in given array as per below example
< ?php
$arr_values = array(3,2,3,5,3,2,4,2,2,1,1,5,3,2,2,2,4,5);
$value_count = array_count_values($arr_values);
print_r($value_count);
?>
| |