how to get value from array in array in array?

≡放荡痞女 提交于 2019-12-25 09:38:06

问题


I get this array when I print_r($_POST), from the below result I want to get the value of skin.

[skin] => 1.jpg

how will i do that ???

 Array
    (
        [form_key] => WceDMPJOQD17ZeSW
        [config_state] => Array
            (
                [themeoptions_general] => 1
            )

        [groups] => Array
            (
                [general] => Array
                    (
                        [fields] => Array
                            (
                                [themeoptions_images] => Array
                                    (
                                        [skin] => 1.jpg
                                    )

                                [themeoptions_customcss] => Array
                                    (
                                        [value] => color:#333;
                                    )

                            )

                )

        )

)

回答1:


$_POST['groups']['general']['fields']['themeoptions_images']['skin']

This will give you the value of skin.




回答2:


echo $_POST['groups']['general']['fields']['themeoptions_images']['skin']

prints

1.jpg


来源:https://stackoverflow.com/questions/7076618/how-to-get-value-from-array-in-array-in-array

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!