Php Switch CASE STATEMENT | Things to do during the week

//Php Switch Case Statement <?php $today = date('l'); $today = "Friday"; //evaluates value //Executes the expression based on the above value switch ($today) { case 'Monday'; echo "Go to the Grocery Store on the way home "; break; case 'Tuesday'; echo "Relax and read a book after dinner "; break; case "Wednesday"; echo "Pick up parcel from the Post Office "; break; case "Thursday"; echo "Go to the Park and excercise"; break; case "Friday"; echo "Go out to dinner and watch movie with girlfriend "; break; case "Saturday"; echo "It's the Weekend, Enjoy!! "; break; case "Sunday"; echo "Relax and wash the car "; break; } ?>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.