聪明的新手;在询问之前我确实尝试过研究,但无法弄清楚。我的应用程序为我提供了这样的嵌套数组结构:
custom_fields => Array (2)
0 => Array (6)
name => "key-specs"
type => "textarea"
code => "key-specs"
value => "here are some product specifications"
sd => "05/01/2013 - 09:25:44 PM"
titled => ""
1 => Array (6)
name => "key-specs-li-class"
type => "dropdownlist"
code => "key-specs-li-class"
value => "flg4_icon"
sd => "05/01/2013 - 09:25:44 PM"
titled => ""
我真的很想通过内部数组中的“名称”维度简单地引用外部数组,而不是遍历数组。例如,我知道名称“key-specs”存在于数组中的某处,我要做的就是快速检索驻留在同一索引处的“值”字符串。
有什么方法可以进行这种类型的直接引用,还是我必须循环?