Link14716
09-02-2003, 08:04 PM
Say I have this:
$newstring = preg_replace($patterns, $replacements, $string);
Now, $string may or may not have HTML tags in it, and if it does, the replacement will most likely b0rk them. So, how can I make it so that it just ignores anything between '<' and '>' and also '&' and ';'?
Also, how can I make it where it will ONLY affect things between '<' and '>' and also '&' and ';'? Thanks. :)
$newstring = preg_replace($patterns, $replacements, $string);
Now, $string may or may not have HTML tags in it, and if it does, the replacement will most likely b0rk them. So, how can I make it so that it just ignores anything between '<' and '>' and also '&' and ';'?
Also, how can I make it where it will ONLY affect things between '<' and '>' and also '&' and ';'? Thanks. :)