The 10th day of the 31st month of 2001 is the same as the 10th day of the 7th month of 2003 so I would guess that you have $pdate[3] and $pdate[2] the wrong way round when you call mktime().
http://www.php.net/manual/en/function.mktime.php says that it should be like this: int mktime (int hour, int minute, int second, int month, int day, int year [, int is_dst]) Try swapping them :) HTH D. > -----Original Message----- > From: Brian Feliciano [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 31 October 2001 4:41 p.m. > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] date problem > > > this is my code: > > ereg("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) > ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})",$rowsko[2], $pdate); > echo date("l, F j, Y [h:i:s A]", > mktime($pdate[4],$pdate[5],$pdate[6],$pdate[3],$pdate[2],2001)); > > > $rowsko[2] is equal to "2001-10-31 10:55:02" > but the result was: Thursday, July 10, 2003 [10:55:02 AM] > i printed out $pdate[1] and it shows: 2001 > > how come it is always 2003 ? please help. > > thanks. > > > > -- > PHP Windows 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] > -- PHP Windows 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]