I have array1 like this:
Array
(
[0] => Array
(
[0] => test
[1] => 123
)
[1] => Array
(
[0] => testx
[1] => 456
)
)
and array2 like this:
Array
(
[0] => Array
(
[0] => test
[1] => somenumber
)
[1] => Array
(
[0] => title
[1] => sometitle
)
[2] => Array
(
[0] => testx
[1] => othernumber
)
)
I need output like this:
Array
(
[0] => Array
(
[0] => test
[1] => 123
[2] => somenumber
)
[1] => Array
(
[0] => testx
[1] => 456
[1] => othernumber
)
)
So I need to compare only value with [0]key of each array. I have tried combinations with array_intersect and array_diff but I just can't get it to work. Can anybody please point me in some direction, what is proper function/way to do this?