liquid79 Posted November 21, 2007 Share Posted November 21, 2007 Hi this is hard to explain but i will try and make it clear as possible. I have made a calendar, which displays weeks that are booked/available and provisional and depending if they are booked etc It will display those dates in a colors such as for booked: red, Green for available and grey for provisional. The weeks run from Sat to Sat. The problem: The last day of the week booked, which will always be the Saturday needs to show bg picture of a split of 2 colors, the pic it shows depends on what the weeks in front state is, for an example. Week 1 is available, which is green and week 2 is booked which is red so the last Saturday of week 1 will need to be split green/red. This could always change so one week could be red and the next green so it would need to show the pic of split red/green or if it was provisional it would be grey/green. My code i have at the moment is below but im not sure how i say if week before = show this Any help or hints will be great! $dec1 = $row->s_1st_8th; // if the result is A the color of that week will be the one shown below etc in my calender when i call booked in the tr. switch ($dec1) { case 'A': $booked = 'bgcolor="#0A8F5E"'; break; case 'B': $booked = 'bgcolor="#FF0000"'; break; case 'P': $booked = 'bgcolor="#999999"'; break; } Link to comment https://forums.phpfreaks.com/topic/78295-php-statmentsi-think/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.