php : how to write $item$i
<p>how to write this correctly?</p>

<pre><code>for($i=2;$i&lt;5;$i++)
{
   $items{$i} = $doc{$i}-&gt;getElementsByTagName('url'); 
}
</code></pre>

<p>got an error: </p>

<blockquote>
  <p>Fatal error: Call to a member function getElementsByTagName() on a non-object</p>
</blockquote>

<p>Thanks,
bye</p>
