Replace
Posted: Thu Jun 30, 2005 3:07 pm
Is there a function that replaces things in a variable?
To replace lol with laugh for example?
Thanks
To replace lol with laugh for example?
Thanks
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
$text = "foo bar foo bar foo bar";
$replaced = str_replace("foo", "x", $text);
echo $replaced;