Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $x = 0;
- $string = "Elephant shoe penguin food telephone";
- $explString = explode(" ", $string);
- foreach($explString as $word){
- if(strlen($word > 6)){
- $x++;
- }
- }
- echo $x; //Returns 3;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement