Jump to content

ensuure str_ireplace ignores text in a tag


Sulman

Recommended Posts

Hi,

 

I'm looking for some advice really. I have a search page and I am currently doing a string replace on the results to replace the search term so that it is highlighted (replaces "Search Term" with "<span class="highlight">Search Term</span>"). The problem I'm having is if the search term is within a a href tag it messes up my links.

 

Any ideas on how I could solve this?

 

Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.