Challenge 3 — Solution Task: Given a simulated $_POST array representing a contact form (name, email, message — but with "email" deliberately missing), loop over $_POST with foreach and print_r any keys that are empty or missing, using isset() to check each expected field safely. "Alex", "message" => "Hello, I have a question." ]; $expectedFields = ["name", "email", "message"]; $missing = []; foreach ($expectedFields as $field) { if (!isset($_POST[$field]) || $_POST[$field] === '') { $missing[] = $field; } } print_r($missing); ?> Output: Array ( [0] => email ) Notes: - $expectedFields lists every field the form is supposed to contain, independent of whatever actually arrived in $_POST. - isset($_POST[$field]) safely checks for each expected key without triggering an "undefined array key" warning, exactly per the chapter's own safe-access guidance. - The || $_POST[$field] === '' check also catches a field that exists but was submitted completely empty - isset() alone only detects a genuinely missing key, not a present-but-blank one. - Only "email" ends up in $missing, since "name" and "message" were both present and non-empty in the simulated $_POST array.