How can I get the last day of the month in PHP?
I want last day of the month like 2009-11-30
Date function has format string "t", returns the number of days in the month of a given date (see the date document)
$a_date = "2009-11-23"
I want last day of the month like 2009-11-30
string date ( string $format [, int $timestamp = time( ) ] )
Date function has format string "t", returns the number of days in the month of a given date (see the date document)
$a_date = "2009-11-23";
echo date( "Y-m-t", strtotime ( $a_date));
No comments