Results 1 to 5 of 5

Thread: PHP date and time functions

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Nov 2009
    Posts
    76,596

    Default

    Code:
    <html>
    <head>
    <title>Background Colors change based on the day of the week</title>
    </head>
    <? 
    $today = date("w");
    $bgcolor = array(
    "#FEF0C5", "#FFFFFF", "#FBFFC4", "#FFE0DD",
    "#E6EDFF", "#E9FFE6", "#F0F4F1"
    );
    ?>
    <body bgcolor="<?print("$bgcolor[$today]");?>">
    <br>This just changes the color of the screen based on the day of the week
    </body>
    </html>

    Last edited by sherlyk; 04-30-2014 at 08:43 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •