Hi im implementing a seatch using mysql qhich takes in a number of keywords.
Im trying to perform Syntax Highligting and have so far used the following.
$search_details['name_short'] = str_ireplace($term,"<b>$term</b>",$search_details['name_short']);
This works great however it uses the case of whatever $term is rather than the case of whatever it was before so
and a search for php returns <b>php</b>development.
Im guessing this is going to have to be done with a preg_replace but I cant quite remeber how to return the original string back as the replacement. If it can search for an array as $term that would also be a bonus im 99% certain theres a way of doing this too.