LinuxSA Mailing list archives

Index: [thread] [date] [subject] [author] [stats]
  From: James Mclean <james@adam.com.au>
  To  : <linuxsa@linuxsa.org.au>
  Date: Thu, 29 Nov 2001 12:43:28 +1030 (CST)

PHP date() function

Hi all,

I have come across a puzzling thing in PHP, with the date() function. Just 
wondering if anyone had seen this before...?

here is the code... (line wraps)
$d = date("m");

for($i=$d;$i>0;$i--) {
    print"<a href=$PHP_SELF?view=$i>".date("F",mktime(0,0,0,$i,date("d"),date
("Y")))."</a></br>";
}

now, here is whats output...

November
October
September
August
July
June
May
April
March
March
January

note the lack of february...

any one seen this before?

Regards,

James Mclean

"Windows didn't get as bad as it is overnight -- it took over ten years of 
careful development."

-- 
LinuxSA WWW: http://www.linuxsa.org.au/  IRC: #linuxsa on irc.linux.org.au
To unsubscribe from the LinuxSA list:
  mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject


Index: [thread] [date] [subject] [author] [stats]
Return to the LinuxSA Mailing List Information Page