get text between $start and $end


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  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. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.