Re: Getting the Date

From: Date: Wed, 28 Jun 2000 07:40:24 +0000
Subject: Re: Getting the Date
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-3506@lists.php.net to get a copy of this message
On Wed, Jun 28, 2000 at 12:30:28AM -0700, Ben Ocean wrote: > Hi; > I'm using this line of code to try and fetch the current date: > $time = getdate time(); getdate is also a function, so it's arguments should also be in braces $time = getdate( time() ); should work > I'm also using the following code to parse out the needed data: > $dateyr = $time("year"); /* as YYYY */ > $datemo = $time("mon"); /* as MM (number) */ > $dateda = $time("mday"); /* as DD (number) */ $dateyr = $time[year]; same for all the others. getdate returns an array, when indexing into an array []'s are used. Hope this clears it up a bit. Cheers Fred -- Frederik Strauss +27-82-468-4679 Obsidian Systems http://www.obsidian.co.za

« previous php.general (#3506) next »