Using the switch Statement : switch statement « Statement « PHP
- PHP
- Statement
- switch statement
Using the switch Statement
<?php
$i = 0;
switch($i) {
case 1:
echo 'First case<BR>';
case 2:
echo 'Second case<BR>';
break;
default:
echo 'Default case';
}
?>
Related examples in the same category