主页
PHP
PHP count_chars() 函数
tryphp_func_string_count_chars4
运行 ❯
×
更改方向
保存代码
更改主题
<?php $str = "PHP is pretty fun!!"; $strArray = count_chars($str,1); foreach ($strArray as $key=>$value) { echo "The character
'".chr($key)."'
was found $value time(s)
"; } ?>