致命错误:调用未定义的方法

时间:2011-04-24 05:14:34

标签: php

我有这个错误

致命错误:在128行调用未定义的方法RecursiveArrayIterator :: fetch_array()

$hierachy = new hierachy;
    $iterator = new RecursiveIteratorIterator(new recursiveArrayIterator($hierachy->getSamelevelNode($name1)));
    try {
        while($row = $iterator->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; 
      }
    } 

1 个答案:

答案 0 :(得分:1)

因为没有这样的方法:http://ru.php.net/RecursiveArrayIterator