$string = "This is
echo retrieve($string,"
echo retrieve($string,"
function retrieve($data, $from, $till, $freq){
if ($freq==0){$freq=1;}
//if (strpos($data, $from)==FALSE) return $data;
//if (strpos($data, $till)==FALSE) return $data;
while($freq){
$temp = substr($data, strpos($data,$from),(strlen($data)-strpos($data,$from)));
$freq--;
$data=substr($temp,strlen($from));
}
$temp = substr($temp,strlen($from),strpos($temp,$till)-strlen($from));
return $temp;
}