1 function get_string_between($string, $start, $end){
2 $string = ' ' . $string;
3 $ini = strpos($string, $start);
4 if ($ini == 0) return '';
5 $ini += strlen($start);
6 $len = strpos($string, $end, $ini) - $ini;
7 return substr($string, $ini, $len);
8}