In PHP there is two array:
$x = array( "a" => "0123", "b" => "1234", "c" => "0123");
$y = array( "a" => "3210", "b" => "1234", "d" => "0123");
i wish to get the result in one array like this:
// right
Array
(
[a] => 0123
[b] => 1234
[c] => 0123
[a] => 3210
[d] => 0123
)
I tried with array_merge($x, $y):
// wrong
Array
(
[a] => 3210
[b] => 1234
[c] => 0123
)
It happen cause there is old database and new database, i am getting both value from both database. If value from both database ist exactly equal, then it needed only on value like this:
[b] => 1234
Please is there some solution in PHP-Code?