code: private function getStringBetween($string, $start, $end)
      {
          $startPos = strpos($string, $start) + strlen($start);
  
          $endPos = strlen($string) - strpos($string, $end);
  
          return substr($string, $startPos, -$endPos);
      }
docs: Get substring between two strings
  
  @param $string
  @param $start
  @param $end
  @return bool|string