I want to highlight some keywords in a text without losing its case.

How do I do that? I have something like the following:

        $keyword="something here";
        <p><font face=tahoma size=2>just some text<br>
        to get it to grab the text and highlight it<br>
        the keyword is right now... check it out<br>
        Something Here, see? it's with a different case...</font></p>
        function highlight_keyword($buffer)
                global $keyword;
                return eregi_replace($keyword,"<b>".$keyword."</b>",$buffer);

the problem is that it's going to give me "...<b>something here</b>, see? 
it's with a different case...", with a lowercased keyword... I want to 
preserve the case of the found text... any ideas????
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to