hi, I'm having a little trouble figuring out how to basically exempt html code from regular expressions. I have a search function on my site that searches through a mysql table and outputs the results with the search word in bold. The problem is that if the search word is located between link tags for example, the bold tags will break the link. Also, if someone searches for the letter b for instance, when everything is outputted to the browser all < br > tags are broken.
So, basically, how do you go about using ereg_replace only on text that is not between < and > and that is not between <a href...> and </a>
thanks in advance.
So, basically, how do you go about using ereg_replace only on text that is not between < and > and that is not between <a href...> and </a>
thanks in advance.
Comment