Changes

Jump to: navigation, search

Working with Strings and Text in PHP

4 bytes added, 17:13, 4 June 2007
Extracting and Replacing Substrings in PHP
The above example will result in the following output:
<tt>Original String = There is a cat in the tree.</tt><br>
<tt>New String = There is a dog in the tree.</tt>
It is perfectly valid to replace one substring with another of different length. It is also possible to simply remove a substring by simply passing in an empty replacement string to the substr_replace fucntion.

Navigation menu