Counts all the values of an array with array array_count_values (array input) : array_count_values « Data Structure « PHP






Counts all the values of an array with array array_count_values (array input)

 
<?
$array = array(1, "hello", 1, "world", "hello");
array_count_values($array);
?>
  
  








Related examples in the same category

1.array_count_values demo
2.array_count_values() function counts the frequency of the values.