There are 3 operations with sets in mathematics: intersection, difference and union (unification). In PHP we can do this operations with arrays:
Try array_merge:
array_merge
array_unique(array_merge($array1, $array2));
PHP Manual