fork download
  1. <?php
  2.  
  3. $mainData = $mapper->getAllData($code);
  4.  
  5. foreach($mainData as $entry) {
  6. $tmp = $entryNN->getID(); // Перебор срабатывает //
  7. }
  8.  
  9. $tmp = $mainData[0]->getID(); // А обращение к одному из не срабатывает, текст ошибки: Fatal error: Call to a member function getKebID() on a non-object in D:\***\edit.php on line 17
Runtime error #stdin #stdout #stderr 0.02s 24448KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Notice:  Undefined variable: mapper in /home/77XEYr/prog.php on line 3
PHP Fatal error:  Call to a member function getAllData() on null in /home/77XEYr/prog.php on line 3