从多维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'][..][...][..]
更重要的是,只需提供钥匙