PHP Switch: example opening times

function Oeffnungszeiten($today){ switch($today){ case "Monday": return "08.00 - 11.00 & 15.00 - 17.00"; case "Tuesday": return "08.00 - 11.00 & 15.00 - 17.00"; case "Wednesday": return "08.00 - 11.00"; case "Thursday": return "08.00 - 11.00 & 15.00 - 17.00"; case "Friday": return "08.00 - 11.00"; case "Saturday": return "Closed"; case "Sunday": return "Closed"; } } echo "Today: "; echo Oeffnungszeiten(date("l"));

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.