mirror of
https://github.com/php/web-php.git
synced 2026-03-31 11:42:09 +02:00
23 lines
435 B
PHP
23 lines
435 B
PHP
<?php require "header.inc"?>
|
|
<h1>Branching Control Structures</h1>
|
|
<?example('<?php
|
|
if ($i < 0) {
|
|
echo "Negative.";
|
|
} else if ($i == 0) {
|
|
echo "Zero.";
|
|
} else {
|
|
echo "Positive.";
|
|
}
|
|
?>');?>
|
|
<?example('<?php
|
|
switch($var) {
|
|
case 1:
|
|
echo "The number 1."; break;
|
|
case "foo":
|
|
echo "The string \'foo\'."; break;
|
|
default:
|
|
echo "default"; break;
|
|
}
|
|
?>');?>
|
|
<?php require "footer.inc"?>
|