$startdate=strtotime("2013-3-09"); $enddate=strtotime("2013-4-05"); $days=round(($enddate-$startdate)/3600/24) ; echo $days; //days为得到的天数;
php计算两个日期相差天数
$startdate=strtotime("2013-3-09"); $enddate=strtotime("2013-4-05"); $days=round(($enddate-$startdate)/3600/24) ; echo $days; //days为得到的天数;