PHP - How to compare two arrays and remove duplicate values
array_unique( array_merge($arr_1, $arr_2) );
or you can do:
$arr_1 = array_diff($arr_1, $arr_2);
$arr_2 = array_diff($arr_2, $arr_1);
i guess...
You can use the function array_diff in PHP that will return and array containing the keys that are the same between the two arrays.
$clean1 = array_diff($array1, $array2);
http://php.net/manual/en/function.array-diff.php