我有一个像这样的多维数组:
Array (
[0] => Array (
[id] => 1
[name] => privilages1
)
[1] => Array (
[id] => 2
[name] => privilages2
)
[2] => Array (
[id] => 3
[name] => privilages3
)
[3] => Array (
[id] => 4
[name] => privilage4 )
[4] => Array (
[id] => 5
[name] => privilages5 )
)
我想将它与另一个数组进行比较,如下所示:
Array (
[0] => Array (
[id] => 1 )
[1] => Array (
[id] => 2)
)
如果值id
匹配,那么我想要第一个示例中的所有值。
我怎样才能做到这一点?