DJ, please put code inside the PHP tags next time. It makes it much easier for us to copy to our editors.
This code is in good condition. What is the problem with it. Have you put it on a site?
Here are a few comments on it. First, if you have a database to go with your project, dump this code and we will help you create a better version in just a few lines… There seems to be a few logic issues with this type of code.
It would be hard to edit, unless this version is always staying in this form. Well, I am reposting it with a few changes in the formatting so I can read it better…
Okay, I only got part of it reformatted to be readable and it is a mess with the logic. You have days separated, but, most of them do one line and the have an else after the if has already closed. They echo an image if the day matches and then have an else that will run for all the other days… You will get the wrong day displayed because it doesn’t go thru all the days first. ? ? ? So, that is not correct. Tell us what you are trying to do with this code and we can help you…
[php]
<?php
//set timezone
putenv ('GMT=Europe/London');
mktime(0,0,0,1,1,2012);
$wday = date("0");
$time = date("Hi");
if ($day == 7) // Sunday
{
switch($time) {
case ($time >= '0000' && $time <= '0600'):
echo"

";
break;
case ($time >= '0600' && $time <= '0900'):
echo"

";
break;
case ($time >= '0900' && $time <= '1200'):
echo"

";
break;
case ($time >= '1200' && $time <= '1400'):
echo"

";
break;
case ($time >= '1400' && $time <= '1600'):
echo"

";
break;
case ($time >= '1600' && $time <= '1800'):
echo"

";
break;
case ($time >= '1800' && $time <= '2000'):
echo"

";
break;
case ($time >= '2000' && $time <= '2100'):
echo"

";
break;
case ($time >= '2100' && $time <= '2200'):
echo"

";
break;
case ($time >= '2200' && $time <= '2400'):
echo"

";
break;
default:
echo"

";
break;
}
} elseif($day == 2) { // Tuesday
echo"

";
} else {
switch($time)
{
case ($time >= '0000' && $time <= '0600'):
echo"

";
break;
case ($time >= '0600' && $time <= '0900'):
echo"

";
break;
case ($time >= '0900' && $time <= '1200'):
echo"

";
break;
case ($time >= '1200' && $time <= '1400'):
echo"

";
break;
case ($time >= '1400' && $time <= '1700'):
echo"

";
break;
case ($time >= '1700' && $time <= '1800'):
echo"

";
break;
case ($time >= '1800' && $time <= '2000'):
echo"

";
break;
case ($time >= '2000' && $time <= '2100'):
echo"

";
break;
case ($time >= '2100' && $time <= '2200'):
echo"

";
break;
case ($time >= '2200' && $time <= '2400'):
echo"

";
break;
}
} elseif($day == 3) { //Wednesday
echo"

";
} else {
switch($time)
{
case ($time >= '0000' && $time <= '0600'):
echo"

";
break;
case ($time >= '0600' && $time <= '0900'):
echo"

";
break;
case ($time >= '0900' && $time <= '1200'):
echo"

";
break;
case ($time >= '1200' && $time <= '1400'):
echo"

";
break;
case ($time >= '1400' && $time <= '1600'):
echo"

";
break;
case ($time >= '1700' && $time <= '1800'):
echo"

";
break;
case ($time >= '1800' && $time <= '2000'):
echo"

";
break;
case ($time >= '2000' && $time <= '2200'):
echo"

";
break;
case ($time >= '2200' && $time <= '2400'):
echo"

";
break;
}
} elseif($day == 4) {
echo"

";
} else {
switch($time)
{
case ($time >= '0000' && $time <= '0600'):
echo"

";
break;
case ($time >= '0600' && $time <= '0900'):
echo"

";
break;
case ($time >= '0900' && $time <= '1200'):
echo"

";
break;
case ($time >= '1200' && $time <= '1400'):
echo"

";
break;
case ($time >= '1400' && $time <= '1700'):
echo"

";
break;
case ($time >= '1700' && $time <= '1800'):
echo"

";
break;
case ($time >= '1800' && $time <= '2000'):
echo"

";
break;
case ($time >= '2000' && $time <= '2100'):
echo"

";
break;
case ($time >= '2100' && $time <= '2200'):
echo"

";
break;
case ($time >= '2200' && $time <= '2400'):
echo"

";
break;
}
} elseif($day == 5) {
echo"

";
} else {
switch($time)
{
case ($time >= '0000' && $time <= '0600'):
echo"

";
break;
case ($time >= '0600' && $time <= '0900'):
echo"

";
break;
case ($time >= '0900' && $time <= '1200'):
echo"

";
break;
case ($time >= '1200' && $time <= '1400'):
echo"

";
break;
case ($time >= '1400' && $time <= '1600'):
echo"

";
break;
case ($time >= '1700' && $time <= '1800'):
echo"

";
break;
case ($time >= '1800' && $time <= '2000'):
echo"

";
break;
case ($time >= '2000' && $time <= '2200'):
echo"

";
break;
case ($time >= '2200' && $time <= '2400'):
echo"

";
break;
}
} elseif($day == 6) {
echo"

";
} else {
switch($time)
{
case ($time >= '0000' && $time <= '0600'):
echo"

";
break;
case ($time >= '0600' && $time <= '0800'):
echo"

";
break;
case ($time >= '0800' && $time <= '1000'):
echo"

";
break;
case ($time >= '1000' && $time <= '1300'):
echo"

";
break;
case ($time >= '1300' && $time <= '1700'):
echo"

";
break;
case ($time >= '1700' && $time <= '1900'):
echo"

";
break;
case ($time >= '1900' && $time <= '2200'):
echo"

";
break;
case ($time >= '2200' && $time <= '2400'):
echo"

";
break;
}
} elseif($day == 0) {
echo"

";
} else {
switch($time)
{
case ($time >= '0000' && $time <= '0600'):
echo"

";
break;
case ($time >= '0600' && $time <= '0800'):
echo"

";
break;
case ($time >= '0800' && $time <= '1000'):
echo"

";
break;
case ($time >= '1000' && $time <= '1200'):
echo"

";
break;
case ($time >= '1200' && $time <= '1400'):
echo"

";
break;
case ($time >= '1400' && $time <= '1600'):
echo"

";
break;
case ($time >= '1600' && $time <= '1800'):
echo"

";
break;
case ($time >= '1800' && $time <= '2000'):
echo"

";
break;
case ($time >= '2000' && $time <= '2200'):
echo"

";
break;
case ($time >= '2200' && $time <= '2400'):
echo"

";
break;
}
}
?>
[/php]