 | library |
|
 | Snippet Options |
|
 | General Options |
|
|
|
Syntax for: Arrays / Count Array Values
|
<?php
$array = array (1, "hello", 1, "world", "hello");
print_r(array_count_values ($array));
?>
|
|
Description for: Arrays / Count Array Values |
Returns and array with a count of all the values:
Array
(
[1] => 2
[hello] => 2
[world] => 1
)
|
|