Posted By

stancox on 07/20/10


Tagged

search


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

manavecplan


see search result like google


 / Published in: PHP
 

$search_string - переменная для поиска

  1. preg_match("/(.{1,100})".$search_string."(.{1,100})/is", $body, $res);
  2. echo " ...".$res[1]."<font color=red><b>".$search_string."</b></font>".$res[2]."...";

Report this snippet  

You need to login to post a comment.