I have 2 arrays -
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
)
)
I want to get the values from Array 1 which are different from the second array.
I have tried using -
$result = array_diff_assoc($array1, $array2);
AND
$result = array_diff($array1, $array2);
But both gave error like -
Notice: Array to string conversion in
Outcome that I am expecting is
Array
(
[0] => Array
(
[description] => 5390BF675E1464F32202B
[to_email] => testagain@gmail.com
)
)