Latest Entries »

Friday, October 23, 2009

Php function for search from a file

If you have the start and end points, you can get the content of that two points. (as a example if the start and end point are and then u can get the content of these tags using this function. eg: content)

","",$contents);
$t = my_strip("abc","xyz",$contents);

echo $t;
?>


aaa.txt
=====
ntbfjkb n jABCjergnv
fvb j njrbn ntbfjkb n jegnb ef
g45yyyXYZtrgjrgbXYZk oi iABCyji oni jij

output
=====
jergnv fvb j njrbn ntbfjkb n jegnb ef g45yyy