PHP str_replace() function


In this article, We will explain to you PHP str_replace() function with example.

PHP str_replace() function

The str_replace() function is a string and case-sensitive function. which is used to find the case-sensitive characters and replace the characters inside another string. so you can see our PHP String Function example.

Syntax

str_replace(find,replace,string,count);

Example

<?PHP
    echo str_replace("my","our","This is my website");
?>

Output

This is our website