Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body>
- <?php
- $favcolor = "red";
- switch ($favcolor) {
- case "red":
- echo "Your favorite color is red!";
- break;
- case "blue":
- echo "Your favorite color is blue!";
- break;
- case "green":
- echo "Your favorite color is green!";
- break;
- default:
- echo "Your favorite color is neither red, blue, nor green!";
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement