re: Daily Challenge #3 - Vowel Counter VIEW POST

FULL DISCUSSION
 

Here's my solution:
PHP:


function countVowels($string){
    preg_match_all("/[aeiou]/i", $string, $matches);
    return sizeof($matches[0]);
}
echo "Number of vowels : " . countVowels("sUpercalifragilisticexpialidocious");


code of conduct - report abuse