【发布时间】:2011-08-16 10:14:08
【问题描述】:
我在print_r($_POST) 时得到这个数组,从下面的结果中我想得到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;
)
)
)
)
)
【问题讨论】:
-
$arr['groups']['general']['fields']['themeoptions_images']['skin'] -
btw
$arr在您的情况下可能需要替换为$_POST... 还要查看您的@以便您可以在前面添加它以避免丑陋的错误定义...thesmithfam.org/blog/2006/05/07/php-the-operator -
这与 Magento 无关,可能被称为一个太简单的问题:-s
-
它与 magento dea Lucasmus 中的渲染器有关,有时太简单的事情会使生活变得地狱:)
-
@lucas 我同意,这对其他人没有帮助,因为它是基本且非常基础的脚本知识,此外,深度数组中的
$_POST并不是最佳实践。
标签: php magento magento-1.4 magento-1.5