I need something like in_array() for search if at least one of $foo is in $bararray, like:
$foo = array("ESD", "RED", "IOP");
$bar = array("IOD", "MNP", "JDE", "RED");
if(in_array($foo, $bar)) // true because RED is in $foo and in $bar
Thank you in advance!
I think you want
array_intersect():$matcheswill return an array of all items that are in both arrays, so you can:empty($matches)count($matches)Reference: http://php.net/manual/en/function.array-intersect.php
Example for your case: