如何在PHP中循环数组

时间:2019-02-23 02:14:41

标签: php arrays multidimensional-array

我尝试循环此数组,我尝试了其他方法,但无法循环此数组。有人可以帮我循环这个数组。我可以通过获取名称和价值以及事物而不是事物的价值来循序渐进。

Array
(
    [bathroom] => Array
        (
            [name] => Bathroom
            [things] => Array
                (
                    [0] => Array
                        (
                            [name] => Cheval Mirrow
                            [cubic] => .14
                            [quantity] => 1
                        )

                    [1] => Array
                        (
                            [name] => Carton/Wine
                            [cubic] => .07
                            [quantity] => 1
                        )

                    [2] => Array
                        (
                            [name] => Carton/picture
                            [cubic] => .07
                            [quantity] => 1
                        )


                )

        )

)

0 个答案:

没有答案