Syntax: str_replace("<replace from string>","<replace to string>","<source string>");
Replace
the characters "I am" with "You are" from the sentence "I am beautiful."
<?php
echo str_replace("I","You","I am beautiful.");
?>
echo str_replace("I","You","I am beautiful.");
?>
Output: You are
beautiful.
Comments