Fatal error: Call to undefined method
<p>I am having this error </p>

<p>Fatal error: Call to undefined method RecursiveArrayIterator::fetch_array()  on line 128</p>

<pre><code>$hierachy = new hierachy;
    $iterator = new RecursiveIteratorIterator(new recursiveArrayIterator($hierachy-&gt;getSamelevelNode($name1)));
    try {
        while($row = $iterator-&gt;fetch_array()) {  //line where error is coming from 128
      if(!isset($targ)) {
       $targ = $row['left_node']+1; 
      }
      if($row['left_node'] == $targ) { 
        echo $row['name'];
        $targ = $row['right_node']+1; 
      }
    } 
</code></pre>
