how to check for a element in array php code example
Example: php in array
$colors = array("red", "blue", "green");
if (in_array("red", $colors)) {
echo "found red in array";
}
$colors = array("red", "blue", "green");
if (in_array("red", $colors)) {
echo "found red in array";
}