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
Advertisements

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
PHP String Functions
  Is there an error in this question or solution?
Chapter 5: Server-Side Scripting (PHP) - Exercises [Page 78]

APPEARS IN

Balbharati Information Technology (Science) [English] Standard 12 Maharashtra State Board
Chapter 5 Server-Side Scripting (PHP)
Exercises | Q 7.2 | Page 78
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×