In PHP, the ______ function is used to replace some characters in a string with some other characters.

  • str_replace()
  • replace()
  • substr_replace()
  • swap()
The str_replace() function in PHP is used to replace some characters in a string with some other characters. It performs a search and replace operation on a given string. It replaces all occurrences of the specified search string with the replacement string. Learn more: https://www.php.net/manual/en/function.str-replace.php
Add your answer
Loading...

Leave a comment

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