title: Undefined offset: 1
body: <p>In my current PHP script this error comes up: Undefined offset: 1</p>
  
  <p>My code is here:</p>
  
  <pre><code>$query = "SELECT item_id, username, item_content FROM updates ORDER BY update_time DESC                 LIMIT " . $start . ", " . $number_of_posts;
  
      $result = mysql_query($query) or die(mysql_error());        
      while($row = mysql_fetch_assoc($result)) {
              preg_match("/&lt;p&gt;(.*)&lt;\/p&gt;/",$row['item_content'],$matches);
              $row['item_content'] = strip_tags($matches[1]);
              $posts[] = $row;
          }
  </code></pre>
  
  <p>If you see whats causing this, posting below would really help. Thanks! :)</p>