PHP str_replace() function - replace part of string from existing string

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." 

echo str_replace("I","You","I am beautiful.");

Output: You are beautiful.

1 comment :

Kerry Schultz said...

I have some issue in understanding the concept and it seems like that you have some good understanding of these. Please share some more detailed info on this.