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."
<?php
echo str_replace("I","You","I am beautiful.");
?>
echo str_replace("I","You","I am beautiful.");
?>
Output: You are
beautiful.
Subscribe to:
Post Comments
(
Atom
)
1 comment :
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.
Post a comment