Posted By

sveggiani on 06/19/10


Tagged

strings not-mine


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

dantreacy


get text between $start and $end


 / Published in: PHP
 

URL: http://www.jonasjohn.de/snippets/php/get-between.htm

  1. function GetBetween($content,$start,$end){
  2. $r = explode($start, $content);
  3. if (isset($r[1])){
  4. $r = explode($end, $r[1]);
  5. return $r[0];
  6. }
  7. return '';
  8. }

Report this snippet  

You need to login to post a comment.