Using elseif()
<?
$logged_in = true;
if ($logged_in) {
print "Welcome aboard, trusted user.";
} elseif ($new_messages) {
print "Dear stranger, there are new messages.";
} elseif ($emergency) {
print "Stranger, there are no new messages, but there is an emergency.";
}
?>
Related examples in the same category