View Full Version : Highlight an search term

09-10-2009, 07:35 AM
how to highlight the search word .....
$data = mysql_query("SELECT * FROM users WHERE upper($field) LIKE'%$find%'");

//And we display the results
while($result = mysql_fetch_array( $data ))
echo $result['fname'];
echo " ";
echo $result['lname'];
echo "<br>";
echo $result['info'];
echo "<br>";
echo "<br>";

//This counts the number or results - and if there wasn't any it gives them a little message explaining that
if ($anymatches == 0)
echo "Sorry, but we can not find an entry to match your query<br><br>";

09-10-2009, 04:17 PM
Is this a question?