A switch Statement : switch statement « Statement « PHP
- PHP
- Statement
- switch statement
A switch Statement
<html>
<head><title>A switch Statement</title></head>
<body>
<div>
<?php
$satisfied = "no";
switch ( $satisfied ) {
case "very":
print "very";
break;
case "no":
print "no";
break;
default:
print "default";
}
?>
</div>
</body>
</html>
Related examples in the same category