title: RecursiveArrayIterator current array
body: <p>I am trying to get the whole current array and I don't think I have gone the right way about it as I get an Undefined index error sometimes.</p>
  
  <pre><code>    $iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($comments_array), RecursiveIteratorIterator::SELF_FIRST);
      while ($iterator-&gt;valid()) {
          if ($iterator-&gt;hasChildren()) {
              $row = $iterator-&gt;getChildren();
              $depth = $iterator-&gt;getDepth();
              echo $row['User_ID'] . "&lt;br&gt;";
          }
          $iterator-&gt;next();
      }
  </code></pre>
  
  <p>I know you can do <code>foreach ($iterator-&gt;getChildren() as $key =&gt; $value)</code> but that doesn't help me as I want the whole array.</p>
  
  <p>Hope this makes sense?!</p>