RE: [PHP-DB] Getting a date in number form
| From: | Jennifer Goodie | Date: | Tue, 15 Jul 2003 21:28:16 +0000 |
| Subject: | RE: [PHP-DB] Getting a date in number form | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-29273@lists.php.net to get a copy of this message | ||
> I need to get the month in a number format; July =7. Right now
> it is returning the string: July.
>
> This is what I am doing.
>
> $today = getdate();
> $month = $today['month'];
> $mday = $today['mday'];
> $year = $today['year'];
>
> What can I do to get the number instead of the word?
http://www.php.net/manual/en/function.getdate.php
says to use "mon" as the
array index rather than "month"