There are 3 operations with sets in mathematics: intersection, difference and union (unification). In PHP we can do this operations with arrays:
Just use $array1 + $array2 It will result union of both array.
$array1 + $array2