I made a search engine, and now I'd like to do a search by keyword, and show the results highlighting the keyword. I have this:
$string = "This is a test, but this will be...";
$keyword = "this";
$new_string = eregi_replace($keyword, "<strong>$keyword</strong>", $string );
Now, my problem is that I don't need to change the keyword, I just need to add the "strong" tags to it. In this example the new string changes the first "This" to lower-case, which is not what I want.
Any suggestions? 🙁