弧
array
array_count_values ( array input )
array_count_values() 皚赣皚ノ input
皚い龄赣 input 皚い瞷Ω计
ㄒ 1. array_count_values() ㄒ
<?php $array = array(1, "hello", 1, "world", "hello"); print_r(array_count_values ($array)); ?>
|
ㄒ盢块 Array
(
[1] => 2
[hello] => 2
[world] => 1
) |
|
把ǎ count()array_unique()array_values()
㎝ count_chars()