Processing each byte in a string
<?php $string = "Processing each byte in a string."; $vowels = 0; for ($i = 0, $j = strlen($string); $i < $j; $i++) { if (strstr('aeiouAEIOU',$string[$i])) { $vowels++; } } ?>