Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $text= $row["text"];
- $find = $term;
- $result = strpos($text, $find);
- substr(string,start,length)
- $text= $row["text"];
- $find = $term;
- $result = strpos($text, $find);
- echo substr($text,($result-200>0)?($result-200):0,200)." ".$find." "
- .substr($text,$result+strlen($find),200);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement