Skip to content

Instantly share code, notes, and snippets.

@susanBuck
Created February 16, 2012 03:52
Show Gist options
  • Save susanBuck/1841806 to your computer and use it in GitHub Desktop.
Save susanBuck/1841806 to your computer and use it in GitHub Desktop.
day-or-night
<!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