Hello
I tested your code and it does not work correctly! I get:
Sun-01-Apr-2001
Thu-29-Mar-2001
Fri-30-Mar-2001
Sat-31-Mar-2001
Thu-05-Apr-2001
Any idea?
I repeat I use php 3.0.12
Garrett wrote:
If you put all of those together, it causes a problem if you don't give them variable names. You can probably fix all of this by giving one to each date function. Like this:
$date1 = date("D-d-M-Y",mktime(0,0,0,4,1,2001)); // returns Sun-01-Apr-2001
$date2 = date("D-d-M-Y",mktime(0,0,0,4,2,2001)); // returns Mon-02-Apr-2001
$date3 = date("D-d-M-Y",mktime(0,0,0,4,3,2001)); // returns Tue-03-Apr-2001
$date4 = date("D-d-M-Y",mktime(0,0,0,4,4,2001)); // returns Wed-04-Apr-2001
$date5 = date("D-d-M-Y",mktime(0,0,0,4,5,2001)); // returns Thu-05-Apr-2001
You can test this by using the following:
echo $date1;
echo "";
echo $date2;
echo "";
echo $date3;
echo "";
echo $date4;
echo "";
echo $date5;
I've tested it, and it works correctly.