diff --git a/solutions/029.md b/solutions/029.md index 890c6a1..3b53640 100644 --- a/solutions/029.md +++ b/solutions/029.md @@ -70,4 +70,22 @@ class Solution: explnation_here +#### PHP + +```php +class Solution { + + /** + * @param String[] $sentences + * @return Integer + */ + function mostWordsFound($sentences) { + $maxNumberOfWords = 0; + foreach($sentences as $sentence){ + $maxNumberOfWords = max($maxNumberOfWords, str_word_count($sentence)); + } + return $maxNumberOfWords; + } +} +``` ***NB***: If you want to get community points please suggest solutions in other languages as merge requests.