我有这个数组:
Array
(
[type] => champion
[format] => standAloneComplex
[version] => 3.15.5
[data] => Array
(
[Aatrox] => Array
(
[id] => Aatrox
[key] => 266
[name] => Aatrox
[title] => the Darkin Blade
[image] => Array
(
现在我想获得[名称]'Aatrox'我用这个变量做这个:
$obj1['data']['aatrox']['name']
但这似乎不起作用,我做错了什么?
答案 0 :(得分:2)
数组键区分大小写。对于第二个索引,请使用Aatrox
而不是aatrox
,如下所示:
$obj1['data']['Aatrox']['name']
答案 1 :(得分:1)