Hi,
I want to use the following str_replace to highlight a searched term in a string.
PHP Code:
str_replace($zoek,'<span class="zoekhighlight">'.$zoek.'</span>',$zoekstring['content'])
The problem is that i want this case insensitive. So when someone types 'kgk', i also want 'KGK' to be highlighted, and this does not happen with the above.
I have found a str_ireplace() function, but this will change my original 'KGK' into a highlighted 'kgk', but i would like to keep it uppercase in this case. Can this be done?
thanks!
Matt
|