将迭代器中元素(对象)放入数组中

来源:互联网 发布:mac adb unauthorized 编辑:程序博客网 时间:2024/06/16 08:35

/**
* @param $obj
* @return array
*/
public function iterator_array($obj)
{
$result = [];
foreach (\$obj as \$row) {
\$result[] = iterator_to_array(\$row);
}
return \$result;
}

阅读全文
0 0