PHP - Checking whether a string exists in an entire array?
- by RC
Hi all,
Basic array question:
$string = "The quick brown cat";
$check1 = "apple";
$check2 = "ball";
$check3 = "cat";
if ( (stripos($string, $check1) === false) ||
(stripos($string, $check2) === false) ||
(stripos($string, $check3) === false)
) {
echo "Fail";
}
How do I condense the above using an array ($check[])?
Thanks!