I have found many examples of how to find repeat characters in a string. I believe my requirement is unique.
I have string
$string=aabbbccffffd;
$data = "aabbbcccffffdz"; $array = str_split($data); $v = array_count_values($array); foreach($v as $k => $val){ echo $k.' = '.$val.''; }