Source Code:
(back to article)
<?php $dayOfWeek = 2; switch ($dayOfWeek): case 1: echo "Today is Monday"; break; case 2: echo "Today is Tuesday"; break; case 3: echo "Today is Wednesday"; break; case 4: echo "Today is Thursday"; break; case 5: echo "Today is Friday"; break; default: echo "It is the weekend!"; endswitch;
Result:
Report an issue