Vivid Lust Posted November 9, 2008 Share Posted November 9, 2008 Hey, Im echoing some stuff froma database: //stuff echo $row['message']; How can I use some string replace function in php to: replace foo with bar replace x and y All in that $row. Thanks!" Quote Link to comment https://forums.phpfreaks.com/topic/132008-string-replace/ Share on other sites More sharing options...
DeanWhitehouse Posted November 9, 2008 Share Posted November 9, 2008 http://uk3.php.net/str_replace Quote Link to comment https://forums.phpfreaks.com/topic/132008-string-replace/#findComment-685937 Share on other sites More sharing options...
Garethp Posted November 9, 2008 Share Posted November 9, 2008 $Store = $row['message']; $Store = str_replace("foo", "bar", $Store); $Store = str_replace("x", "y", $Store); echo $Store; Quote Link to comment https://forums.phpfreaks.com/topic/132008-string-replace/#findComment-685938 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.