Page 2 of 2

Re: comparing two arrays - prob a simple answer

Posted: Tue Mar 02, 2010 12:56 pm
by AbraCadaver
Weirdan wrote: array_intersect more likely:

Code: Select all

 
$a = array(2, 3);
$b = array(1, 2, 3, 4);
if (array_intersect($a, $b)) {
   echo 'yup';
} else {
   echo 'nope';
}
 
That sounds familiar.