Answers for "php array common element"

PHP
0

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
}
Posted by: Guest on September-27-2021

Code answers related to "php array common element"

Browse Popular Code Answers by Language