- explode: documentation ( source)
<?php
function GetBetween($content,$start,$end){
$r = explode($start, $content);
if (isset($r[1])){
$r = explode($end, $r[1]);
return $r[0];
}
return '';
}
echo GetBetween('foo test bar', 'foo', 'bar');
echo explode('bar','foo test bar');
//print_r(explode("help","help php help program help is good"));
?>