> -----Original Message----- > From: Mario A. Salinas [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 31, 2001 7:33 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Trouble creating a list on months > > > The actual function is as follows: > ---------------------------------------------------- > function month_select($default=1) { > > $offset = date("n")-1; // value used to be 'm' > > echo ("<select name=month > style=\"font-family:Verdana,Helvetica;font-size:8pt;\">"); > for($x=1;$x<=12;$x++) { > $month = $x + $offset; > if($month>12) $month -= 12; > echo("<option value=$month"); > if($month==$default) echo(" selected"); > echo(">".date("F",mktime(0,0,0,$month))."</option>"); Try changing this to echo ">".date("F",mktime(0,0,0,$month,1))."</option>"); > } > echo ("</select>"); > } > ---------------------------------------------------- > > Any Ideas what could be causing the problem? I'm new to this > and have been staring at it for a while. Your help is greatly > appreciated. Actually, I'd expect that if you try your code again today, it works just like you'd expect. Mktime() uses the current (local date/time) value for any parameters that you leave out. Since you were running this on July 31st, that means your mktime call was trying to build timestamps for February 31st (which is actually in March), April 31st (actually in May), and so on. --- Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full." LeTourneau University || -- Henry Kissinger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]