PHP Foreach Arrays and Objects
我有一个对象数组;运行返回以下输出;print_r()
Array
(
[0] => stdClass Object
(
[sm_id] => 1
[c_id] => 1
)
[1] => stdClass Object
(
[sm_id] => 1
[c_id] => 2
)
)
如何循环访问结果并访问学生班级对象?