...

View Full Version : "include" different every day of the week



pirolilla
01-24-2004, 07:04 AM
I need aid with script PHP. I want to open a different page in "include" depending on the day of the week, with this scheme:

Monday, Tuesday, Wednesday, Thursday and Friday = > page01.inc

Saturdays = > page02.inc

Sundays = > page03.inc

You can help me in this problem. I am not very expert in PHP.

Thanks.

Nightfire
01-24-2004, 09:04 AM
<?php

$day = date("w");

switch($day){
case 0:
include("page03.inc");
break;
case 6:
include("page02.inc");
break;
default:
include("page01.inc");
break;
}
?>

pirolilla
01-24-2004, 09:41 AM
Wonderfull. Works OK.

Thousands of thanks.

This forum is fantastic, I must a beer to you.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum