I have two associative arrays as following
Array
(
[0] => Array
(
[description] => aaaaaa
[value] => 11111
[id] => 14
)
[1] => Array
(
[description] => dddddd
[value] => 44444
[id] => 0
)
)
Array
(
[0] => Array
(
[id] => 14
[value] => 11111
[description] => aaaaaa
)
[1] => Array
(
[id] => 15
[value] => 222222
[description] => bbbbbb
)
[2] => Array
(
[id] => 16
[value] => 333333
[description] => cccccc
)
)
The result I am getting is
Array
(
[0] => Array
(
[description] => aaaaaa
[value] => 11111
[id] => 14
)
[1] => Array
(
[description] => dddddd
[value] => 44444
[id] => 0
)
)
Noting that dddd
is available in the first array but not the second.
I am using the array_intersect_assoc( $array1, $array2 )
function.
Please help. It's not logical at all to return such results