English

Write Programs for the following. Write a PHP code to count no. of words in the given string. - Information Technology

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?
Chapter 5: Server-Side Scripting (PHP) - Exercises [Page 78]

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×