Home / PHP Tips Generated By ChatGPT / Merging Arrays in PHP Combine two arrays into one with array_merge(). Source Code $array1 = ['a', 'b', 'c']; $array2 = ['d', 'e', 'f']; $merged = array_merge($array1, $array2); print_r($merged);