Posted By

vanity on 12/08/06


Tagged

php search String find findstr needle haystack


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vali29


findStr


 / Published in: PHP
 

URL: http://www.subeta.org

  1. function findStr($string,$beg,$end) {
  2. $p1 = strpos($string, $beg) + strlen($beg);
  3. $string2 = substr($string,$p1);
  4. $p2 = strpos($string2, $end);
  5. $found = substr($string,$p1,$p2);
  6. return $found;
  7. }

Report this snippet  

You need to login to post a comment.