Highlight search term in mysql php search

前端 未结 3 450
借酒劲吻你
借酒劲吻你 2020-12-18 16:04

Could someone please help me to highlight the searchterm in my php search code? Below is the code that I am currently using, and it works fine. Would just like to add a high

3条回答
  •  遥遥无期
    2020-12-18 16:34

    You will want to use a regex (preg_replace) to search for your term and replace it with said term surrounded with .

    Look at the documentation of preg_replace for how to use it: http://us3.php.net/preg_replace

提交回复
热议问题