如何获取多维数组和对象

时间:2013-11-13 13:56:31

标签: arrays object

我正面临多维阵列的问题,请你帮我拿取所有元素,提前谢谢。

Array ( [0] => stdClass Object
    (
        [employee_id] => 7007
        [first_name] => phoukaothong
        [0] => Array
            (
                [0] => Array
                    (
                        [0] => stdClass Object
                            (
                                [leave_code] => OL
                                [max_allow] => 10
                                [taken] => 1
                            )

                    )

                [1] => Array
                    (
                        [0] => stdClass Object
                            (
                                [leave_code] => SL
                                [max_allow] => 15
                                [taken] => 0
                            )

                    )

                [2] => Array
                    (
                        [0] => stdClass Object
                            (
                                [leave_code] => PL
                                [max_allow] => 10
                                [taken] => 0
                            )

                    )

                [3] => stdClass Object
                    (
                        [0] => Array
                            (
                                [0] => stdClass Object
                                    (
                                        [leave_code] => AL
                                        [max_allow] => 10
                                        [taken] => 0
                                    )

                            )

                    )

                [4] => stdClass Object
                    (
                        [0] => Array
                            (
                                [0] => stdClass Object
                                    (
                                        [leave_code] => AL
                                        [max_allow] => 10
                                        [taken] => 0
                                    )

                            )

                    )

            )

    )

[1] => stdClass Object
    (
        [employee_id] => 7009
        [first_name] => william
        [0] => Array
            (
                [0] => Array
                    (
                        [0] => stdClass Object
                            (
                                [leave_code] => OL
                                [max_allow] => 10
                                [taken] => 1
                            )

                    )

                [1] => Array
                    (
                        [0] => stdClass Object
                            (
                                [leave_code] => SL
                                [max_allow] => 15
                                [taken] => 0
                            )

                    )

                [2] => Array
                    (
                        [0] => stdClass Object
                            (
                                [leave_code] => PL
                                [max_allow] => 10
                                [taken] => 0
                            )

                    )

                [3] => stdClass Object
                    (
                        [0] => Array
                            (
                                [0] => stdClass Object
                                    (
                                        [leave_code] => AL
                                        [max_allow] => 10
                                        [taken] => 0
                                    )

                            )

                    )

                [4] => stdClass Object
                    (
                        [0] => Array
                            (
                                [0] => stdClass Object
                                    (
                                        [leave_code] => AL
                                        [max_allow] => 10
                                        [taken] => 0
                                    )

                            )

                    )

                [5] => stdClass Object
                    (
                        [0] => Array
                            (
                                [0] => stdClass Object
                                    (
                                        [leave_code] => OL
                                        [max_allow] => 10
                                        [taken] => 0
                                    )

                            )

                    )

                [6] => stdClass Object
                    (
                        [0] => Array
                            (
                                [0] => stdClass Object
                                    (
                                        [leave_code] => SL
                                        [max_allow] => 15
                                        [taken] => 0
                                    )

                            )

                    )

                [7] => Array
                    (
                        [0] => stdClass Object
                            (
                                [leave_code] => PL
                                [max_allow] => 10
                                [taken] => 5
                            )

                    )

                [8] => Array
                    (
                        [0] => stdClass Object
                            (
                                [leave_code] => AL
                                [max_allow] => 10
                                [taken] => 10
                            )

                    )

                [9] => stdClass Object
                    (
                        [0] => Array
                            (
                                [0] => stdClass Object
                                    (
                                        [leave_code] => AL
                                        [max_allow] => 10
                                        [taken] => 0
                                    )

                            )

                    )

            )
    )
)

0 个答案:

没有答案