I want want my output like this when I search a keyword like
“programming”
php programming language
How to do this in php mysql?
Any idea?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just perform a str_replace on the returned text.
Any instance of “programming”, even if as part of a larger word, will be wrapped in
<b>tags.For instances where more than one word are used
This will split the
$searchinto an array at the spaces, and then wrap each match in the<b>tags.You could use
<b>or<strong>tags (See What's the difference between <b> and <strong>, <i> and <em>? for a dicussion about them).