Advertisements
Advertisements
Question
Write Programs for the following.
Write a PHP code to count no. of words in the given string.
Answer in Brief
Solution
Coding:
<?php
$a="Hypertext Preprocessor";
echo "<br><br> String is ".$a;
echo" <br><br> Words in String is ".str_word_count($a);
?>
shaalaa.com
Is there an error in this question or solution?