The string: I have a Green apple.
I want to search for the word green and highlight it.
My code (where $search_word = green):
$textstring = eregi_replace($search_word, "<b>" . $search_word . "</b>", $textstring);
The result: I have a <b>green</b> apple.
Not bad but how do I retain the original case in $textstring so that the result would be: I have a <b>Green</b> apple.
Changing the $search_word to Green is not an option.
Thank in advance for any assistance.