Hello,
I receive a data with the method:
$data = $_POST['data'];
I want to check if the data received match one of these values in an array:
$array = array(
"foo" => "foo",
"bar" => "bar",
);
I want the result to be like this:
if ( $data == $array ) {
// do something
} else {
// return
}
How do I achieve this and thanks in advance.