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 Quote Link to comment 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? Quote Link to comment 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.