Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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";
 
PREVIOUS NEXT
Tagged: #search #needle #array #php
ADD COMMENT
Topic
Name
4+3 =