我有 2 个数组如下(数组 1,数组 2),我想根据以下条件合并为一个数组如下(新数组)
条件:(如果 Array-1(hID) = Array-2(hID) 然后 megre 如下)
阵列 1
Array
(
[0] => Array
(
[hID] => 107
[env] => DEV
[serv] => server1
)
[1] => Array
(
[hID] => 122
[env] => DEV
[serv] => server2
)
阵列 2
Array
(
[107] => Array
(
[hID] => 107
[cpu] => 32
[mem] => 24
)
[122] => Array
(
[hID] => 122
[cpu] => 16
[mem] => 24
)
新阵列
Array
(
[0] => Array
(
[hID] => 107
[env] => DEV
[serv] => server1
[cpu] => 32
[mem] => 24
)
[1] => Array
(
[hID] => 122
[env] => DEV
[serv] => server2
[cpu] => 16
[mem] => 24
)
皈依舞
qq_花开花谢_0