I saw a question online:
The result of array("a")+array("b") is___
A.array("a","b")
B.array("b","a")
C.array("b")
D.array("a ")
Answer: D
When adding two arrays in PHP, why does the result remain unchanged?
Because, they are equivalent to array("0″=>"a")+array("0″=>"b"), their key names are the same, the former cannot be overwritten by the latter, if array("0″=>"a")+array("0″=>"b", "1″=>"c"), then the result is equal to array("0″=>"a" ,"1″=>"c")
What will happen if there are the same key names in the same array?
Look at a piece of code from the official PHP manual:
http://www.bkjia.com/PHPjc/325972.html