doulaozhi6835 2015-02-05 04:18
浏览 11

从对象获取多个数据

i m using mind body api to fetch data. i have n object that contains the following data, i need to fetch all the id firstname and lastname and store it in database. i have shown the data here only till [3] => stdClass Object, but the original list is long.

Array
(
    [0] => stdClass Object
        (
            [ID] => 100000173
            [FirstName] => a
            [LastName] => b
        )

    [1] => stdClass Object
        (
            [ID] => 100000174
            [FirstName] => c
            [LastName] => d
        )

    [2] => stdClass Object
        (
            [ID] => 100000175
            [FirstName] => e
            [LastName] => f
        )

    [3] => stdClass Object
        (
            [ID] => 100000176
            [FirstName] => g
            [LastName] => h
        )
)

I received the above result from the following code..

$MBclients = $classService->GetClients(array());
if(intval($MBclients->GetClientsResult->ResultCount) > 0)
    {
        echo "<pre>";print_r($MBclients->GetClientsResult->Clients->Client);//die;
    }   

The code that i tried to fetch data is

$info = $MBclients->id; 
echo $info; 

But it didn't showed any result. can anyone tell how to fetch the result

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 keil的map文件中Image component sizes各项意思
    • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
    • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
    • ¥15 划分vlan后,链路不通了?
    • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
    • ¥15 Vue3 大型图片数据拖动排序
    • ¥15 Centos / PETGEM
    • ¥15 划分vlan后不通了
    • ¥20 用雷电模拟器安装百达屋apk一直闪退
    • ¥15 算能科技20240506咨询(拒绝大模型回答)