Bladephp: Now with 8+ codeigniter, php, and laravel project 8+ php project From $37/Month From Rs. 2499/Month

PHP array_count_values() Function

by
Category:php
php php array function
PHP array_count_values() Function

The array_count_values() function counts all the values of an array.

If you want to get duplicate values count in an array,this method can be use easily.It will display array values all count.

$array = array("A","B","C","A","C");
print_r(array_count_values($array));

Output

Array ( [A] => 2 [B] => 1 [C] => 2 ) 

0 Comments


Html code work in comment box


Related Post