ash wrote:
i didn't test that, if $phrase contains html tags it might mess up
your markup.
Yes. I want avoid html tags.
i'm not sure what you mean but here's an example:
$old_html = '<p>some text and some more text</p>';
$phrase = 'text';
so, using above said function
$new_html = '<p>some <span style="put your style here">text</span> and
some more <span style="put your style here">text</span></p>";
all fine
now: $phrase = '<p>some';
$new_html = <span style="put your style here"><p>some</span> text and
some more text</p>";
clearly messed up html
which means: if your search phrases do not contain html tags, above
solution is fine. if they contain tags it's more complicated. i don't
have a solution for that right now.
micha