[SOLVED] I need to bold keywords with regex...
Posted: Sat Oct 09, 2004 7:05 am
I am using this code to bold keywords in a string named $description:
It works, but if the keyword is found in description, it will ignore its case so for example keyword "PHP" becomes "<b>php</b>". I'd like to keep the case of the keyword it finds. I guess it's possible with regex?
Any idea?
Thanks!
Tomas
Code: Select all
$description = @eregi_replace(" $kw", " <b>$kw</b>", $description);Any idea?
Thanks!
Tomas