Write a PHP program to count the words in the string
Write a PHP program to count the words in the string.
- You can use only one variable.
- You can use PHP built-in String Function.
<?php $sample_words = "This is Tutorials Class, learn programming tutorials here."; echo str_word_count($sample_words); ?>
Tutorials Class - Output Window
Learn more about the similar topics:
|PHP String Handling|
|Interview Questions & Answers|
|No Content Found.|