Forum Moderators: coopster
$concat = preg_replace("/($word)/i","<strong class=\"searchWordFound\">$1</strong>",$concat);
We need to convert these to a Regex that does not search for $word [i]inside[/] HTML tags or their attributes.
The reason for this is that if I do a search for ex “a e” when the function does the second round of the above preg_replace it will add a new <strong> tag around the e inside searchWordFound. Same with “a o”, “e a” etc.
Is that doable at all?
/Hafnius