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.
Animals
Plants
EOD;
$str = preg_replace('/(.*?)<\/h3>/', '$1
', $str);
echo $str;