Jump to content

Search result highlighter


Imad

Recommended Posts

Hi guys, I need help with a search highlighter I'm making.

 

Here's some code I found while searching in Google:

 

$search = $_GET['search'];
$replace = "<b>$search</b>";
$results = eregi_replace($search, $replace, $results);
return $results;

 

It didn't highlight anything and didn't work. Any ideas on how I can make one? All results are taken from a database using a search system I made.

Best Regards.

Link to comment
https://forums.phpfreaks.com/topic/118113-search-result-highlighter/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.