<html>
<body>
$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>
<!-- Mirrored from www.w3schools.com/php/phptryit.asp?filename=tryphp_switch by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:29:31 GMT -->
</html>