count_chars()

It return information about characters used in a string

Example

<?php
echo “<pre>”;
print_r(count_chars(“phpcode”,1));
?>

Output

Array
(
[99] => 1
[100] => 1
[101] => 1
[104] => 1
[111] => 1
[112] => 2
)