PHP Source:
<!DOCTYPE html>
<html>
<body>

<?php
$str = "PHP is pretty fun!!";
$strArray = count_chars($str,1);

foreach ($strArray as $key=>$value)
   {
   echo "The character <b>'".chr($key)."'</b> was found $value time(s)<br>";
   }
?>


</body>
</html>
Result:
Show PHP - © w3schools.com
Privacy Policy