Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从多维php数组请求日期_Php_Arrays - Fatal编程技术网

从多维php数组请求日期

从多维php数组请求日期,php,arrays,Php,Arrays,我有这样一个数组: $tmb = Array( [xThis] => 12400 [fThat] => 7 [cMore] => Array( [236] => Array( [acting_person] => "Test info" [tThings]

我有这样一个数组:

$tmb = Array(
             [xThis] => 12400
             [fThat] => 7
             [cMore] => Array(
                    [236] => Array(
                        [acting_person] => "Test info"
                        [tThings] => "history"
                        )
                    )
               )
          )
$tmb['cMore'][236]['acting_person']
我知道怎么叫xThis(比如$tmb['xThis'] 但在这样的声明中,我该如何称呼[扮演者]

$new = $tmb['xThis'] . $tmb['fThat'] . ??????????????????

抱歉,如果这是基本的,我对PHP真的很陌生。谢谢。

要访问acting_person项,您需要指定acting_person的所有父键。(当然,理论上,在多维数组中可以有多个acting_person键。)

您可以访问(而不是“调用”)这样的子阵列:

$tmb = Array(
             [xThis] => 12400
             [fThat] => 7
             [cMore] => Array(
                    [236] => Array(
                        [acting_person] => "Test info"
                        [tThings] => "history"
                        )
                    )
               )
          )
$tmb['cMore'][236]['acting_person']

它很容易访问数组的任意维的值

   $tmb['1st dimension'][2nd dimensin]['3rd dimension'][..][...][..]
更重要的是,只需提供钥匙