how can i retrieve the last day of the month?
like 31 - Jul, 30 - Jun , 28 - Feb
?php
$month = 8;
$year = 2003;
$lastdayofmonth = mktime(12,0,0,$month+1,0,$year);
?
You could also use the date() function with the t parameter. Of course,
that also requires a timestamp...
Larry
--
PHP General
how can i retrieve the last day of the month?
like 31 - Jul, 30 - Jun , 28 - Feb
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Sheawh wrote:
how can i retrieve the last day of the month?
like 31 - Jul, 30 - Jun , 28 - Feb
?php
$month = 8;
$year = 2003;
$lastdayofmonth = mktime(12,0,0,$month+1,0,$year);
?
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP
3 matches
Mail list logo