Example:
PHP
<?php
// PHP program to count number of
// words in a string
$str = "I Love US";
// Using str_word_count() function to
// count number of words in a string
$len = str_word_count($str);
// Printing the result
echo $len;
?>
How to count Words in PHP | PHP String Tutorial |
Type: | Php |
Category: | Web Tutorial |
Sub Category: | PHP String Tutorial |
Uploaded by: | Admin |