$ms = strtotime("2004-4-10")-strtotime("2004-3-10");
$days = $ms/(60*60*24);
echo $days;
//还有2004-4-10加上一天或一个月\一年得到一个时间.
echo date("Y-m-d",strtotime("+1 month", strtotime("2004-4-10")));
$days = $ms/(60*60*24);
echo $days;
//还有2004-4-10加上一天或一个月\一年得到一个时间.
echo date("Y-m-d",strtotime("+1 month", strtotime("2004-4-10")));
转换为秒数,然后处理