简单教程
提交运行
代码编辑器:
<?php $a = array("A","Cat","Dog","A","Dog"); print_r(array_count_values($a));
运行结果: