PHP参考多维数组中的特定键和值 [英] PHP reference specific key and value within multidimensional array
本文介绍了PHP参考多维数组中的特定键和值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
很抱歉,一个基本的问题,我求助于找不到解决方案(或者我对此感到非常沮丧).
sorry a basic question and I have resorted to asking as I can't find (or I've just got so frustrated with it) the solution.
我希望在多维数组中引用特定的键和值.我的示例数组如下.
I wish to reference a specific key and value within a multidimensional array. My sample array is as below.
因此对于键1并希望引用unique_inter(3)中包含的值
So for key 1 and wish to reference the value contained within unique_inter (3)
有人建议使用此功能或方法吗?
Any anyone advise the function or method to do this?
谢谢
Array
(
[1] => Array
(
[unique_inter] => 3
[user_id] => 1
)
[4] => Array
(
[unique_inter] => 1
[user_id] => 4
)
)
推荐答案
$your_array[1]['unique_inter']
这篇关于PHP参考多维数组中的特定键和值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文