PHP switch case
PROGRAM :
<html>
<head>
<title>Switch case</title>
</head>
<body>
<?php
$month="jan";
switch($month)
{
case "jan":
echo "<br>You have selected January !!!";
break;
case "feb":
echo "<br>You have selected February !!!";
break;
default :
echo "<br>Other than jan and feb";
break;
}
?>
</body>
</html>
OUTPUT :
<html>
<head>
<title>Switch case</title>
</head>
<body>
<?php
$month="jan";
switch($month)
{
case "jan":
echo "<br>You have selected January !!!";
break;
case "feb":
echo "<br>You have selected February !!!";
break;
default :
echo "<br>Other than jan and feb";
break;
}
?>
</body>
</html>
OUTPUT :
0 comments:
Post a Comment