Syntax of array_count_values
array array_count_values(array array)
Returns an array whose elements’ keys are the input array’s values. The value of each key is the number of times that key appears in the input array as a value
Example of array_count_values
<?php
$array = array(1, "hello", 1, "world", "hello");
print_r(array_count_values($array));
?>
Array ( [1] => 2 [hello] => 2 [world] => 1 )