Array_merge () combines one or more Arrays
[Function]
This function combines the units of one or more arrays. The values of an array are appended to the values of the previous array.
Returns an array of results. If the input array contains the same string key name, these values will be overwritten by the previous
Value. However, if the array has the same numeric key name, the last value will not overwrite the original value.
Is appended to the backend. If only one array is assigned and the array is a digital index, the key name is continuously indexed.
Scope of use]
Php4, php5.
[Use]
Array array_merge (array array1 [, array array2 [, array...])
Arrayn/required/array to be used for merging
[Example]
[Php]
<Pre name = "code" class = "php"> <? Php
$ Arr1 = array ("color" => array ("favorite" => "red"), 5 );
$ Arr2 = array (10, "color" => array ("favorite" => "green", "blue "));
Var_dump (array_merge ($ arr1 ));
/*
Array (2 ){
["Color"] =>
Array (1 ){
["Favorite"] =>
String (3) "red"
}
[0] =>
Int (5)
}
*/
Taken from zuodefeng's note