How to print nested stdclass object array

前端 未结 1 764
执笔经年
执笔经年 2021-01-26 05:59

I am trying to print values in this nested stdClass Object but I\'m having trouble accessing them. How do I print the ID?

stdClass Object (
    [AddUserWithLimit         


        
相关标签:
1条回答
  • 2021-01-26 06:36

    If you tab out the output it becomes clear that ID is a property of AddUserWithLimitResult

    stdClass Object ( 
        [AddUserWithLimitResult] => stdClass Object (
            [Header] => stdClass Object (
                [Code] => UserAdded 
                [Description] => User created 
            )
            [ID] => 2243272 
            [UserName] => gmail.com
            [FirstName] => sar 
            [LastName] => Sea 
            [Email] => gmail.com 
            [SubDomain] => olo 
        ) 
    )
    

    $object->AddUserWithLimitResult->ID

    Edit: It looks like you updated the question with the tabbed code. When I saw it it was difficult to tell which properties belonged to which objects.

    0 讨论(0)
提交回复
热议问题