if (condition met) { statement(s); } elseif (condition met) { statement(s); } else { statement(s); } Example with matching variables to user-submitted values: if ($animal=='cats') { statement(s); } elseif ($animal=='dogs') { statement(s); } else { statement(s); } Example with isset() if (isset($variable)) { statement(s); } else { statement(s); }