switch statement in php
<!DOCTYPE html>
<html>
<head>
<title>switch statement</title>
</head>
<body>
<?php
$color ="yellow";
switch ($color) {
case 'green':
echo "color is green.";
break;
case 'yellow':
echo "color is yellow.";
break;
case 'red':
echo "color is red.";
break;
default:
echo "color is not avaliable in case options.";
break;
}
?>
</body>
</html>
0 Comments