如何从数组中的数组中获取值? [英] how to get value from array in array in array?

查看:150
本文介绍了如何从数组中的数组中获取值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我print_r($_POST)时,我得到了这个数组,从下面的结果中我想获得skin的值.

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

[skin] => 1.jpg

我将如何做?

 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;
                                    )

                            )

                )

        )

)

推荐答案

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

这将为您提供皮肤的价值.

This will give you the value of skin.

这篇关于如何从数组中的数组中获取值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆