We can use str_replace() method to replace a text in a string with another string.

BY Best Interview Question ON 21 Apr 2019

Example

str_replace("interview","interviews","Best interview questions!");