Is there a function that replaces things in a variable?
To replace lol with laugh for example?
Thanks
Replace
Moderator: General Moderators
perhaps you should try http://www.php.net,
http://de3.php.net/manual/en/function.str-replace.php
and while you are there, you should get an overview of all possible string manipulations:
http://de3.php.net/manual/en/ref.strings.php
http://de3.php.net/manual/en/function.str-replace.php
and while you are there, you should get an overview of all possible string manipulations:
http://de3.php.net/manual/en/ref.strings.php
Code: Select all
$text = "foo bar foo bar foo bar";
$replaced = str_replace("foo", "x", $text);
echo $replaced;