if (array_intersect($1,$2)) { //the ones that match??? how would I show on the ones that match? } else { //the ones that do not match how do I show the ones that do not match? } I have tried return false and return true nothing.. i am not sure what I am doing incorrectly I have also tried if (!array_intersect($1,$2))
$matches = array_intersect($array1, $array2); $nomatches = array_diff($array1, $array2); print_r($matches); print_r($nomatches);