[Solved] PHP, I want to count the number of words in a string with more than six letters


Use regexp:

$x = preg_match_all("/\\w{6,}/", "Elephant shoe penguin food telephone", $matches);

solved PHP, I want to count the number of words in a string with more than six letters