title: Empty array (which's not empty)
body: <pre><code>while($row = mysql_fetch_row($result)){
          preg_match('#&lt;span id="lblNumerZgloszenia" style="font-weight:bold;font-style:italic;"&gt;([^&lt;]*)&lt;\/span&gt;#',$row[1],$matches);
          $query2 = 'UPDATE content_pl SET kategoria_data='.$matches[1].' WHERE id='.$row[0].';';
          mysql_query($query2);
      }
  </code></pre>
  
  <p>I'm doing this <code>preg_match</code> to get the <code>span</code> contents into <code>$matches</code> array.
  When I do a <code>print_r($matches)</code>, it shows the right results but when I use <code>$matches[1]</code>, it browser tells me that there is no such index.</p>
  
  <p>EDIT: <code>print_r</code> shows</p>
  
  <pre><code>[...]Array ( [0] =&gt; TOW:   (210) 252250, (220) 01-07-2002 [1] =&gt; TOW:   (210) 252250, (220) 01-07-2002 ) Array ( [0] =&gt; TOW:   (210) 252251, (220) 01-07-2002 [1] =&gt; TOW:   (210) 252251, (220) 01-07-2002 ) Array ( [0] =&gt; TOW:   (210) 252252, (220) 01-07-2002 [1] =&gt; TOW:   (210) 252252, (220) 01-07-2002 ) Array ( [0] =&gt; TOW:   (210) 252253, (220) 01-07-2002 [1] =&gt; TOW:   (210) 252253, (220) 01-07-2002 )[...]
  </code></pre>