I would like to create a PHP variable which I can echo to change the color of the background weekly.
Here is what I had reached so far
<?php
// set the default timezone to use. Available since PHP 5.1
date_default_timezone_set('EST');
$today = date("l");
if($today == "Sunday")
{
$color = "#FEF0C5";
}
elseif($today == "Monday")
{
$color = "#FFFFFF";
}
elseif($today == "Tuesday")
{
$color = "#000000";
}
elseif($today == "Wednesday")
{
$color = "#FFE0DD";
}
elseif($today == "Thursday")
{
$color = "#E6EDFF";
}
elseif($today == "Friday")
{
$color = "#E9FFE6";
}
else
{
// Since it is not any of the days above it must be Saturday
$color = "#F0F4F1";
}
print("<body bgcolor=\"$color\">
");
?>
I only managed to make the colors change daily, but i don't know how can I make the colors change weekly instead.
The second thing is that I need to make the colors of each first and last day of the month the color should be pink.
Any help would be very very much appreciated!