To replace all occurrences of a search string with a replacement string in PHP, you would use the ________ function.

  • str_replace()
  • replace_string()
  • find_replace()
  • substitute_string()
The str_replace() function is used in PHP to replace all occurrences of a search string with a replacement string within a given string.
Add your answer
Loading...

Leave a comment

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