查找出现次数最多的字符PHP代码

$arr=str_split($str);
$arr=array_count_values($arr);
arsort($arr);
print_r($arr);

编程技巧