The strlen() function in PHP can be used to find the number of words in a string.

  • TRUE
  • FALSE
This statement is false. The strlen() function in PHP is used to find the length of a string in terms of the number of characters, not the number of words. To count the number of words in a string, you would need to use a different approach, such as the str_word_count() function or custom logic to split the string and count the words. Learn more: https://www.php.net/manual/en/function.strlen.php https://www.php.net/manual/en/function.str-word-count.php
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *