[eluser]Evil Wizard[/eluser]
[quote author="Dam1an" date="1243963231"]Would this not cause a problem when both arrays have the same key (eg both have index 0)? Would you expect to overwrite it, increment the key of one to avoid crash etc?[/quote]
That could be avoided with
Code:
if(!count(array_diff_assoc($array1, $array2)) {
$array3 = $array1 + $array2
}
If any keys are in both arrays it wont add them together.