php计算两个日期的相差天数,处理时间间隔

举例:想要获取 2016-04-10和2016-06-15相差多少天。php $begin_date = strtotime('2016-04-10'); $end_date = strtotime('2016-06-15'); $days = round(($end_date - $begin_date) / 3600 / 24); 其中已经使用strtotime将时间格式化为时间戳,直接输出$
相关文章
相关标签/搜索