Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save raihan-uddin/1da6059491e61f458c0dad30aeedaa4e to your computer and use it in GitHub Desktop.
Save raihan-uddin/1da6059491e61f458c0dad30aeedaa4e to your computer and use it in GitHub Desktop.
PHP : Get the text between $start and $end
function GetBetween($content,$start,$end){
$r = explode($start, $content);
if (isset($r[1])){
$r = explode($end, $r[1]);
return $r[0];
}
return '';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment