php获取指定月份的天数
瑞瑞瑞 发布于 阅读:178
PHP获取指定月份的天数,以下是代码:
/**
* 获取指定月份的天数
* @param $month string 月份 01-12
* @param $year string 年份 0000
* @return false|string
*/
function getMonthDayNum($month, $year) {
return date("t", strtotime($year . $month . '01'));
}