PHP str_word_count() May 22, 2012 Pramod T P It return the number of words in a string Example <?php echo “<pre>”; print_r(str_word_count(‘It return the number of words in a string’)); ?> Output 9