note 25699 added to function.getdate

From: Date: Wed, 02 Oct 2002 15:37:05 +0000
Subject: note 25699 added to function.getdate
Groups: php.notes 
Request: Send a blank email to php-notes+get-37552@lists.php.net to get a copy of this message
How about this for putting getdate() into sql easily: $today = $getdate(); $mm = $today["mon"]; $dd = $today["mday"]; $yyyy = $today["year"]; if($dd <10) { $dd = "0$dd"; } $xdate = "$yyyy-$mm-$dd"; works for me :) -- http://www.php.net/manual/en/function.getdate.php http://master.php.net/manage/user-notes.php?action=edit+25699 http://master.php.net/manage/user-notes.php?action=delete+25699 http://master.php.net/manage/user-notes.php?action=reject+25699

« previous php.notes (#37552) next »