1
0
mirror of https://github.com/php/web-php.git synced 2026-03-31 19:52:29 +02:00
Files
archived-web-php/oreilly99/s_lang5.php3
1999-08-21 16:11:20 +00:00

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"?>