PHP: Adding arrays together

This is documented and correct: http://us3.php.net/manual/en/language.operators.array.php

The + operator appends elements of remaining keys from the right handed array to the left handed, whereas duplicated keys are NOT overwritten.

So I guess it’s not a bug in php and what is suppose happen. I hadn’t noticed this before either.

Leave a Comment