I need to highlight a keyword in a paragraph, as google does in its search results. Let\'s assume that I have a MySQL db with blog posts. When a user searches for a certain
If you're a beginner this will not be super easy as someone might think...
I think you should do the following steps:
In the third step you can use some regular expression to replace the user searched keywords with a bolded equivalent. str_replace could work too...
I hope this helps... If you could provide your database structure maybe I can give you some more precise hints...