Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Change body background color each week from four set colors

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #44900
    digitalvaldosta
    Participant

    Where I work, they use colored tags that determine what week clothing items were received. They use only four colors (red, green, blue, yellow). We would like to create a page in which the background color changes to that week’s color. I am sure this is simple but I am still new to PHP and am trying to automate trivial things like this as best as possible.

    Thanks in advanced for your help.

    [Josh McClanahan](http://joshmcclanahan.com “Josh McClanahan”)
    from [Digital Valdosta](http://digitalvaldosta.com “Digital Valdosta”)

    #135705
    donpeppo
    Member

    this might not be the most elegant solution but its something

    $day = date(‘l’);

    if($day == ‘Monday’)
    {
    //monday color code
    }
    elseif($day == ‘Thuesday’)
    {
    //thuesday color code
    }
    //..and so on…

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.