array_count_values(): Count the number of times each specific value has appeared in the array $array;
$array = [1,2,3,4,2,2,3,4,5];
$count = array_count_values($array);
Print result:
array_count_values(): Count the number of times each specific value has appeared in the array $array;
$array = [1,2,3,4,2,2,3,4,5];
$count = array_count_values($array);
Print result: