// Merging two array into one array (also Remove Duplicates) array_unique(array_merge($array1, $array2), SORT_REGULAR); // https://stackoverflow.com/questions/13469803/php-merging-two-array-into-one-array-also-remove-duplicates