RE: Getting a date in number form

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux