简体   繁体   English

PHP 引用多维数组中的特定键和值

[英]PHP reference specific key and value within multidimensional array

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.我的示例数组如下。

So for key 1 and wish to reference the value contained within unique_inter (3)因此对于键 1 并希望引用包含在 unique_inter (3) 中的值

Any anyone advise the function or method to do this?有人建议 function 或方法吗?

Thanks谢谢

Array
(
    [1] => Array
        (
            [unique_inter] => 3
            [user_id] => 1
        )

    [4] => Array
        (
            [unique_inter] => 1
            [user_id] => 4
        )

)
$your_array[1]['unique_inter']

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM