I am not getting the right result.
$foobar = array_unique(array_merge($foo,$bar));
Does this make $foobar = an array that is the unique values of the merged arrays $foo and $bar?