Conside the following example for string replacement in php
<?php $baseString = "the quick brown red fox jumps over the lazy dog"; // syntax : //str_replace(<string to find>, <new replacement text>, <original string>); $textContent = str_replace("quick brown", "lazy red", $baseString); echo $textContent; ?>