Consider you are building a search functionality for your website. Which function would you use to determine if a particular keyword exists within a content string?

  • strpos()
  • str_replace()
  • str_word_count()
  • str_split()
The strpos() function is used to find the position of a substring (keyword) within a string. It returns the position or false if not found, making it suitable for searching within a content string.
Add your answer
Loading...

Leave a comment

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