This script will display how many words are in your string.
<?php
/*****************
--PHP Word Count
--More PHP Scripts at
--http://icecaves.net/tags/php
*****************/
$text = "Put your text here and php will calculate how many words your text contains. Put a backslash before any double quotes you use.";
$total_words = str_word_count($text, 0);
echo "<b>String:</b> $text<br><b>Word Count:</b> $total_words";
?>Code Preview:
String: Put your text here and php will calculate how many words your text contains. Put a backslash before any double quotes you use.
Word Count: 23
Word Count: 23
Forum Board:

Comments
How to jquery is useful in php?