$a1 = array(
"str1"=> "value1",
"1234" => "value2"
);
$a2 = array(
"str2"=> "value3",
"5678" => "value4"
);
$am = array_merge($a1, $a2);
Result:
$am =
(
"str1" => "value1",
"0" => "value2",
"str2" => "value3",
"0" => "5678"
)
Problem: 2nd and 4th array elements of $am. Their keys become "0" ?
array_splice does the same.
I checked PHP sources and found it tries to determine the key type (numeric or string) but something is broken there ?
Any help ?