Forum Moderators: coopster
vice versa this will not highlight capitalised matches :(
code:
$body = html_entity_decode(nl2br(stripslashes($myresult['message']))); $body = preg_replace("/$value/","<span class=\"highlight\">$value</span>",$body); echo $body;?>
[edited by: coopster at 12:25 pm (utc) on Feb. 7, 2005]
[edit reason] removed urls [/edit]
like:
preg_replace("/$value/i","<span class=\"highlight\">$value</span>",$body); nb. you might want to get rid of the links to those images since links to just about anything on your own site is sorta frowned upon and a mod will delete it. btw, what's that 'Find' stuff there on the bottom of firefox? Is it an extension that's worth trying out?