The str_replace() function is an built-in function in PHP which is used to replaces any portion of a string with another string.…

The str_replace() function is an built-in function in PHP which is used to replaces any portion of a string with another string.…