Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php array common element

$a = array(1, 2, 3, 4);
$b = array(4, 5, 6, 7);
$c = array_intersect($a, $b);
if (count($c) > 0) {
    var_dump($c);
    //there is at least one equal value
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #array #common #element
ADD COMMENT
Topic
Name
4+8 =