I know how to use str_replace for simple tasks, like this...
$Header = str_replace(\'Animals
\', \'Animals
\', $Heade
You can use the str_replace()
technique that has been suggested in the primary comments, but I believe preg_replace() using regular expressions is the best practice for wildcard replacements.
<?php
$str = <<<EOD
<h3>Animals</h3>
<h3>Plants</h3>
EOD;
$str = preg_replace('/<h3>(.*?)<\/h3>/', '<h3><span class="One">$1</span></h3>', $str);
echo $str;