I try to get the differences between two arrays I have one big array with subarray and a small simple array. I want to get the difference from the big array.
I use this to get the differences between 2 arrays, but working with subarray is someting else. $array3 = array_diff($bigArray, $smallArray);
$smallArray = Array
(
[0] => 2 (how i compare this values)
[1] => 3 (how i compare this values)
)
$bigArray = Array
(
[0] => Array
(
[g_id] => 2 (with this value)
[g_nume] => Arad I Betel
)
[1] => Array
(
[g_id] => 3 (with this value)
[g_nume] => Arad IV Agape
)
[2] => Array
(
[g_id] => 4 (with this value)
[g_nume] => Frumuseni
)
[3] => Array
(
[g_id] => 7 (with this value)
[g_nume] => Cuvin
)
)
And the result to be like this:
Array
(
[0] => Array
(
[g_id] => 4 (with this value)
[g_nume] => Frumuseni
)
[1] => Array
(
[g_id] => 7 (with this value)
[g_nume] => Cuvin
)
)