I'm having a trouble with the code only with one letter "W" based on the script far below.
The line $day = date('W'); does not work at all but all other lines work. E.g.
$day = date('j');
$day = date('w');
etc
They work. But 'W' does not work. Why?
I tried the array to add:
0 => "anydir/apage.php",
Not working.
01 => "anydir/apage.php",
Also not working. What is wrong? Thanks much in advance.
<?php
$content = array(
1 => "dir1/page1.php",
2 => "dir2/page2.php",
3 => "dir3/page3.php",
[..... ]
365 => "dir/page365.php"
);
$day = date('W');
$file = isset($content[$day]) ? $content[$day] : 'dir/fail.php';
include $file;
?>