Created
February 16, 2012 03:52
-
-
Save susanBuck/1841806 to your computer and use it in GitHub Desktop.
day-or-night
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
<!doctype html> | |
<head> | |
<? | |
$time = date("G"); | |
if($time < 20) { | |
$background_color = "#37BDBD"; | |
} | |
else { | |
$background_color = "#000000"; | |
} | |
?> | |
<style type='text/css'> | |
body { | |
background-color:<?=$background_color?>; | |
} | |
</style> | |
</head> | |
<body> | |
Time: <?=$time?> <br> | |
The background color should be: <?=$background_color?> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment