robert_gsfame Posted July 13, 2010 Share Posted July 13, 2010 i have below code n it didnt work :confused: $searchtext=explode(" ",$_POST['text']); $countsearchtext=count($searchtext); $product1x=htmlentities($selectimagefetch['product_name']); for($i=0;$i<$countsearchtext;$i++){ if(strpos($product1x,$searchtext[$i])==true){ $product1=str_replace($searchtext[$i],"<b>".$searchtext[$i]."</b>",$product1x);}else{ $product1=$product1x;} } i dont get the bold search text?? thx Link to comment https://forums.phpfreaks.com/topic/207578-bold-search-text/ Share on other sites More sharing options...
Wolphie Posted July 13, 2010 Share Posted July 13, 2010 Do you mean highlight each occurrence of the search word on the page? Link to comment https://forums.phpfreaks.com/topic/207578-bold-search-text/#findComment-1085258 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.