我有 2 个数组 -
Array
(
[0] => Array
(
[description] => 5390BF675E1464F32202B
[to_email] => test@test.com
)
[1] => Array
(
[description] => 5390BF675E1464F32202B
[to_email] => test3@test.com
)
[2] => Array
(
[description] => 5390BF675E1464F32202B
[to_email] => testagain@gmail.com
)
)
Array
(
[0] => Array
(
[to_email] => test@test.com
)
[1] => Array
(
[to_email] => test3@test.com
)
)
我想从数组 1 中获取与第二个数组不同的值。
我试过使用 -
$result = array_diff_assoc($array1, $array2);
和
$result = array_diff($array1, $array2);
但是两者都给出了错误,例如-
注意:数组到字符串的转换
我期待的结果是
Array
(
[0] => Array
(
[description] => 5390BF675E1464F32202B
[to_email] => testagain@gmail.com
)
)
慕的地10843