I have 2 array, I need to compare both array, I tried with array_diff(), but its not working with multi-dimensional array. I need to compare both array and get the unique array values from given array. how can I compare both array in Laravel?
First array :
array:2 [▼
0 => array:3 [▼
"company_id" => "2"
"product_id" => 48
"combo_id" => 45
]
1 => array:3 [▼
"company_id" => "2"
"product_id" => 48
"combo_id" => 50
]
]
Second array :
array:2 [▼
0 => array:3 [▼
"company_id" => 2
"product_id" => 48
"combo_id" => 45
]
1 => array:3 [▼
"company_id" => 2
"product_id" => 48
"combo_id" => 60
]
]
If compare both aarry value, the second value is different, which "combo_id" => 50
but the seconds has "combo_id" => 60
, so this array is not matrch with the second, I want this one as output