我想从这个数组中回显cer_type
Array
(
[0] => stdClass Object
(
[id] => 1
[cer_type] => S.L.C.
)
[1] => stdClass Object
(
[id] => 3
[cer_type] => Intermediate
)
)
答案 0 :(得分:2)
试试这个:
<?php
echo $array[0]->cer_type;
// or if you want to loop through the array:
foreach ($array as $element) {
echo $element->cer_type;
}