Answers for "how to search two needle in an array in_array php"

PHP
1

how to search two needle in an array in_array php

$needle = array('p', 'c');
$haystack = array('a', 'b', 'c');

echo (count(array_intersect($needle, $haystack))) ? "found" : "not found";
Posted by: Guest on February-20-2022

Browse Popular Code Answers by Language