PHP Str_Word_Count-2.Php – String Function

<?php
$summary = <<< summary
this is a test. this is a test. this is a test. this is a test. this is a test. this is a test.
this is a test. this is a test. this is a test. this is a test. this is a test. this is a test.
this is a test. this is a test. this is a test. this is a test. this is a test. this is a test.
summary;
   $words = str_word_count($summary,2);
   $frequency = array_count_values($words);
   print_r($frequency);
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.