I have an array of objects; running print_r()
returns the output below;
Array
(
[0] => stdClass Object
(
[sm_id] => 1
[c_id] => 1
)
[1] => stdClass Object
(
[sm_id] => 1
[c_id] => 2
)
)
How to loop through the result and access the student class objects?
$key=>
part is not needed – Midiron