The array_merge() function intelligently merges two or more arrays: $merged = array_merge(array1, array2 [, array … ]) If a numeric key from an earlier array is repeated, the value from the later array is assigned a new numeric key: Example of array_merge