I want to count the words in a specific string , so I can validate it and prevent users to write more than 100 words for example .
I wrote this function but I don\'t
Maybe str_word_count could help
str_word_count
http://php.net/manual/en/function.str-word-count.php
$Tag = 'My Name is Gaurav'; $word = str_word_count($Tag); echo $word;