title: undefined offset PHP error
body: <p>I am receiving the following error in PHP</p>
  
  <blockquote>
    <p>Notice undefined offset 1: in C:\wamp\www\includes\imdbgrabber.php line 36</p>
  </blockquote>
  
  <p>Here is the PHP code that causes it:</p>
  
  <pre><code>&lt;?php
  
  # ...
  
  function get_match($regex, $content)  
  {  
      preg_match($regex,$content,$matches);     
  
      return $matches[1]; // ERROR HAPPENS HERE
  }
  </code></pre>
  
  <p>What does the error mean?</p>