String word count : String Count « String « PHP






String word count

<?php
$summary = <<< summary
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text  
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
summary;
   $words = str_word_count($summary);
   echo "Total words in summary: $words";
?>


           
       








Related examples in the same category

1.String word count and frequency