This site is mobile accessible. Press the "Tap Here" button to use a different font-size.
Smartphone icons created by Freepik - Flaticon
The array_count_values() function counts all the values of an array.
array_count_values(array)
Parameter | Description |
---|---|
array | Required. Specifying the array to count values of |
Return Value: | Returns an associative array, where the keys are the original array's values, and the values are the number of occurrences |
PHP Version: | 4+ |
Count all the values of an array:
<?php $a=array("A","Cat","Dog","A","Dog"); print_r(array_count_values($a)); ?>
Eventually the navigation links, above, will be replaced by these (previous) and (next) buttons below.
Animated PHP icons used in the buttons provided by ICONS8.COM. Smartphone icons created by Freepik - Flaticon