php 判断字符串中包含重复相同的次数 array_count_values str_split max 函数组合使用
//判断字符串中包含重复相同的次数 $mystr = '8288'; $tmp = array_count_values(str_split($mystr)); $maxcount = max($tmp); var_dump($maxcount);//3