1 2 3 4 5 6 7 8 9 10
<?php $replacements = array('A', 'one', 'some'); $the=array('the','the','the'); $str = "The quick brown fox jumps over the lazy dog and runs to the forest."; $str=str_ireplace($the, $replacements, $str); echo $str; ?>
1
A quick brown fox jumps over A lazy dog and runs to A forest.