I'm doing search engine for games titles in my database and I have some issue with that.
First, here's the look on DB:
ID TITLE
1 aaB
2 abc
3 ABC
4 AbdedABc
5 deff
Next, I'm doing this query:
SELECT g.title FROM game g WHERE g.title LIKE '%abc%'
All I want to do, is to print out all titles like this (with bold matches):
abc // match
ABC // match
Abded ABc // match last part, space added for clarity
For now, my script returns this:
str_replace('abc', '<b>abc</b>', $row['title'])
abc // matches
ABC
AbdedABc
Someone know any algorithm (or other way) to do not change letters upper/lower case?