$list = AdminMenu::find([
'conditions' => "pid = ?0",
'bind' => [$pid],
'order' => 'sort asc, id asc',
]);
Next, I want to loop the result set
foreach ($list as &$value) {
$value->up_title = '无';
}
tip:
( ! ) Fatal error: Uncaught Error: An iterator cannot be used with foreach by reference in C:\wamp64\www\admin\app\controllers\MenuController.php on line 30
( ! ) Error: An iterator cannot be used with foreach by reference in C:\wamp64\www\admin\app\controllers\MenuController.php on line 30
line 30 is foreach ($list as &$value) {
what should I do? To cyclic operation result set