Last active
January 20, 2019 15:07
-
-
Save impshum/362bb5e527d374cfb776929276b0d8e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function go(){ | |
$day = date('l'); | |
if ($day == 'Monday') { | |
display($day, 'red'); | |
} elseif ($day == 'Tuesday') { | |
display($day); | |
} elseif ($day == 'Wednesday') { | |
display($day); | |
} elseif ($day == 'Thursday') { | |
display($day); | |
} elseif ($day == 'Friday') { | |
display($day); | |
} elseif ($day == 'Saturday') { | |
display($day); | |
} elseif ($day == 'Sunday') { | |
display($day); | |
} | |
} | |
function display($day){ | |
echo "<h1 class='$day'>Today is $day</h1>"; | |
} | |
?> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Daze</title> | |
</head> | |
<style> | |
.Monday { | |
color: red; | |
} | |
.Tuesday { | |
color: green; | |
} | |
.Wednesday { | |
color: blue; | |
} | |
.Thursday { | |
color: pink; | |
} | |
.Friday { | |
color: orange; | |
} | |
.Saturday { | |
color: grey; | |
} | |
.Sunday { | |
color: purple; | |
} | |
</style> | |
<body> | |
<?php go(); ?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment