Can't access array by index, but can iterate with foreach
<p>How come that I can't access array by index <code>$obj-&gt;property[0]</code> but can iterate through the array (each has only one value) and then get the value.</p>

<pre>foreach($obj->property as $inner_obj)
{
    foreach($inner_obj->property as $inner_inner_obj)
        echo $inner_inner_obj->property;
}</pre>

<p>If I access array by index I get <code>Undefined offset: 0</code></p>

<p><strong>Edit: Output of var_dump</strong></p>

<pre>array(1) {
 [0]=> object(FooClass)#141 {
   // yadda yadda
  }
}</pre>
