如何从php中的嵌套对象获取数组?

时间:2015-10-05 06:43:57

标签: php arrays laravel object

我在print_r()期间得到这个。

stdClass Object
(
    [0] => stdClass Object
        (
            [id] => 1
            [name] => Ramesh
            [cdate] => 2015-10-03 10:36:08
            [private] => 0
            [userid] => 1
            [subscriber_count] => 0
        )

    [result_code] => 1
    [result_message] => Success: Something is returned
    [result_output] => json
    [http_code] => 200
    [success] => 1
)

我尝试了很多但没有用。请帮帮我

1 个答案:

答案 0 :(得分:1)

尝试使用get_object_vars()这可能有所帮助。