PHP指定月対応日数のコード取得
<?php
/**
*
* www.jbxue.com
*/
$firstday = mktime(0,0,0,$month,1,$year); // UNIX
$days = date('t',$firstday); //
$days = cal_days_in_month(CAL_GREGORIAN, 4, 2013);// 2003-02
$days = date('t', strtotime($year . '-' . $month . '-01'));//
$ndays = date("t"); //return the number of days for this month and this year
date("j",mktime(0,0,0,$month+1,0,$year));
?>
参考資料:
http://blog.csdn.net/maitiandaozi/article/details/8808041