Hi all,
I am looking for means to highlight certain text on a page. I use <span class="highlight">This is a sample</span>
to replace the text "This is a sample" that is found, with the help of the preg_replace function.
My problem arises when there is overlapping text. If I search for the phrase "sample text" on the same page, it is not highlighted. I need the highlighting to merge.
Any help with this problem would be appreciated.
Thanks!