Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body>
- <?php
- $month = 1;
- if ($month < 1 || $month > 12) {
- echo "Number not a month";
- } else {
- switch ($month) {
- case 3:
- echo "The result is: Spring";
- break;
- case 4:
- echo "The result is: Spring";
- break;
- case 5:
- echo "The result is: Spring";
- break;
- case 6:
- echo "The result is: Summer";
- break;
- case 7:
- echo "The result is: Summer";
- break;
- case 8:
- echo "The result is: Summer";
- break;
- case 9:
- echo "The result is: Autumn";
- break;
- case 10:
- echo "The result is: Autumn";
- break;
- case 11:
- echo "The result is: Autumn";
- break;
- default:
- echo "The result is: Winter";
- }
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement