PrMa Posted March 11, 2008 Share Posted March 11, 2008 Like the topic says. Someone know of a (simple) way to do this? I'm not asking for highlighting words on search result page, but the page you come to after clicking on a link on the result page. You can see the example images here: http://194.165.231.32/hemma/illumi/ As explained above, it's the second image i'm asking how to do. Quote Link to comment https://forums.phpfreaks.com/topic/95673-highlight-search-terms-on-target-page/ Share on other sites More sharing options...
laffin Posted March 11, 2008 Share Posted March 11, 2008 u wud prolly want to use ob_start ob_get_contents and ob_end_clean than use either strpos or preg_mach to find the matching strings Quote Link to comment https://forums.phpfreaks.com/topic/95673-highlight-search-terms-on-target-page/#findComment-489816 Share on other sites More sharing options...
discomatt Posted March 11, 2008 Share Posted March 11, 2008 preg_replace() would be the one you want. if you give us a little more detail on how you are getting the content to be highlighted, we can be more specific. Quote Link to comment https://forums.phpfreaks.com/topic/95673-highlight-search-terms-on-target-page/#findComment-489849 Share on other sites More sharing options...
PrMa Posted March 11, 2008 Author Share Posted March 11, 2008 The result I get when i search (first picture), comes from a mysql database. The site itself tough (second picture), is plain html. But if it is easier to implement what I want if that also comes from the database, I can make it so. Quote Link to comment https://forums.phpfreaks.com/topic/95673-highlight-search-terms-on-target-page/#findComment-490002 Share on other sites More sharing options...
PrMa Posted March 12, 2008 Author Share Posted March 12, 2008 Suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/95673-highlight-search-terms-on-target-page/#findComment-490446 Share on other sites More sharing options...
PrMa Posted March 16, 2008 Author Share Posted March 16, 2008 I have tried using the ob_start and ob_end_flush, but with no luck. Anyone got ideas? Quote Link to comment https://forums.phpfreaks.com/topic/95673-highlight-search-terms-on-target-page/#findComment-493490 Share on other sites More sharing options...
BlueSkyIS Posted March 16, 2008 Share Posted March 16, 2008 http://www.alistapart.com/articles/searchhighlight/ Quote Link to comment https://forums.phpfreaks.com/topic/95673-highlight-search-terms-on-target-page/#findComment-493493 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.