3
I have these two multidimensional arrays and would like the difference between them, similar to what the function array_diff
does, but with multidimensional arrays:
$array_1:
Array
(
[0] => Array
(
[idAmbiente] => 1
[nomeAmbiente] => Desenvolvimento
[codAmbiente] => D
)
[1] => Array
(
[idAmbiente] => 2
[nomeAmbiente] => Produção
[codAmbiente] => P
)
[2] => Array
(
[idAmbiente] => 3
[nomeAmbiente] => Testes
[codAmbiente] => T
)
)
$array_2:
Array
(
[0] => Array
(
[idVisibilidade] => 14
[urlSistema] => http://www-gexdia/prevsuporte
[responsavelVisibilidade] => 12
[sistema_idSistema] => 10
[idAmbiente] => 2
[dataBaseList] => 18
)
)
I’d like the function to do something like: array_diff_multidimensional($array_1,$array_2,'idAmbiente');
Upshot:
Array
(
[0] => Array
(
[idAmbiente] => 1
[nomeAmbiente] => Desenvolvimento
[codAmbiente] => D
)
[1] => Array
(
[idAmbiente] => 3
[nomeAmbiente] => Testes
[codAmbiente] => T
)
)