RE: [PHP-DB] Getting a date in number form

2003-07-15 Thread Jennifer Goodie
> 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"


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Getting a date in number form

2003-07-15 Thread Rick Dahl
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?

- Rick