PHP gets the number of days in the specified month, php gets the number of days in the month
A very practical php function that I suddenly discovered when I was writing an interface recently. Share it here:
cal_days_in_month(calender,$month,$year);
calender: calendar, constant, such as CAL_GREGORIAN (Gregorian calendar);
$month: specified month;
$year: specified year;
Return: Number of days
For example:
$monthday = cal_days_in_month(CAL_GREGORIAN,3,2016);
echo $monthday;
Output: 31
http://www.bkjia.com/PHPjc/1109845.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1109845.htmlTechArticlePHP gets the number of days in a specified month, php gets the number of days in the month. I suddenly discovered a very practical php when I was writing an interface recently. Function, share it here: cal_days_in_month(calender,$...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn