eb110k
asked on
PHP in_array or maching element's value in array
Hello, I'm trying to match element's value in array with in_array function as shown below.
It doesn't have to be in_array to acomplish this.
But, so far it doesn't work that I expected.
Please help.
Thank you.
It doesn't have to be in_array to acomplish this.
But, so far it doesn't work that I expected.
Please help.
Thank you.
$a = array("a", "b", "c");
$b = array("a", "z", "b", "c", "d");
if (in_array($b, $a))
echo "Found";
Actually, I need to acomplish:
"If ALL of $a array's elements found in array $b then reurn true."
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I found a perfect solution in the article.