Using else with if() : If statement « Statement « PHP
- PHP
- Statement
- If statement
Using else with if()
<?
$logged_in = true;
if ($logged_in) {
print "Welcome aboard, trusted user.";
} else {
print "Howdy, stranger.";
}
?>
Related examples in the same category