PHP Gets the maximum number of days in a month (last day), the last day of the days
This example describes how PHP gets the maximum number of days in a month (the last day). Share to everyone for your reference. Specific as follows:
Gets the maximum number of days of a month (last day) function Getmonthlastday ($month, $year) {switch ($month) {case 4: Case 6: Case 9: Case one: $days =; break; Case 2: if ($year% 4 = = 0) { if ($year% = = 0) { $days = $year% = = 0? 29:28; } else { $days =; } } else { $days =; } break; Default: $days =; Break } return $days;}
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/1039204.html www.bkjia.com true http://www.bkjia.com/PHPjc/1039204.html techarticle PHP Gets the maximum number of days (last day) of a month. The last day of this article describes how PHP gets the maximum number of days in a month (last day). Share to everyone ...