hello i have a search function in that i will search a db for keywords. i would like to highlight the keywords and found a second function that i would like to implement int
I would not use the SQL method. As time goes on, and you have more and more highlighting rules, that will become unmanageable. Also trickier to handle the cases where you need to highlight foo differently to foobar, but one contains the other.