php3-list | 199908
Date: 08/31/99
- Next message: Rasmus Lerdorf: "Re: [PHP3] Date Stuff"
- Previous message: Chris Cosentino: "[PHP3] PHP escaping text I don't want escaped."
- In reply to: Richard Lynch: "[PHP3] Re: New Warning: KriZ will clear Bios at Christmas Day(August 18, 1999)"
- Next in thread: Rasmus Lerdorf: "Re: [PHP3] Date Stuff"
- Reply: Rasmus Lerdorf: "Re: [PHP3] Date Stuff"
- Maybe reply: Richard Lynch: "Re: [PHP3] Date Stuff"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Is there something wrong with this snippit?
for ($i = 1; $i <= 13; $i++) {
echo "<option VALUE=$i>";
echo date("M", mktime(0,0,0,$i));
echo "</option>\n";
}
I'm using it in a select statement and here's the output:
<option VALUE=1>Jan</option>
<option VALUE=2>Mar</option>
<option VALUE=3>Mar</option>
<option VALUE=4>May</option>
<option VALUE=5>May</option>
<option VALUE=6>Jul</option>
<option VALUE=7>Jul</option>
<option VALUE=8>Aug</option>
<option VALUE=9>Oct</option>
<option VALUE=10>Oct</option>
<option VALUE=11>Dec</option>
<option VALUE=12>Dec</option>
<option VALUE=13>Jan</option>
Any idea why the months are off?
I believe that I am using PHP 3.08
Thanks.
Andy
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Rasmus Lerdorf: "Re: [PHP3] Date Stuff"
- Previous message: Chris Cosentino: "[PHP3] PHP escaping text I don't want escaped."
- In reply to: Richard Lynch: "[PHP3] Re: New Warning: KriZ will clear Bios at Christmas Day(August 18, 1999)"
- Next in thread: Rasmus Lerdorf: "Re: [PHP3] Date Stuff"
- Reply: Rasmus Lerdorf: "Re: [PHP3] Date Stuff"
- Maybe reply: Richard Lynch: "Re: [PHP3] Date Stuff"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

