Here’s a cool function that I use quite often. It looks for two different strings, a beginning and end string, from the original string and returns the middle remainder. Super useful if you do a lot of get_file_contents() and API coding. Check it out:
<?php
function getBetween($content,$start,$end){
    $r = explode($start, $content);
    if (isset($r[1])){
        $r = explode($end, $r[1]);
        return $r[0];
    }
    return '';
}
?>

Example: 
<?php 
$content = "Try to find the guy in the middle with this function!";
$start = "Try to find ";
$end = " with this function!";
$output = getBetween($content,$start,$end);
echo $output;
?>
This will return "the guy in the middle".