What you are asking is exactly what is in the isset page
isset($_POST['name']) && isset($_POST['number']) && isset($_POST['address'])
matches with:
isset($_POST['name'], $_POST['number'], $_POST['address'])
If you are asking for a better or practical way of saying this, assuming that you already have all the necessary keys, you can use something like:
$requiredKeys = ['name', 'number', 'address']; $notInPost = array_filter($requiredKeys, function ($key) { return ! isset($_POST[$key]); });
Remember that isset does not return the same result as array_key_exists
source share