Friday, April 3, 2015

How to replace a text within a string - PHP Snippet

How to replace a text within a string - PHP Snippet

The PHP str_replace() function replaces some characters with some other characters in a string.
echo str_replace("world", "Dolly", "Hello world!"); // outputs Hello Dolly!
Disqus Comments