echo date("Y-m-d H:i:s", strtotime("+10 day", strtotime($date)));
如果不是你已经转成了 date 格式,而是 time 格式,那就省事了。
echo date("Y-m-d H:i:s", strtotime("+10 day", $time));
如果你只要算从现在起,10天后,那更省事了。
echo date("Y-m-d H:i:s", strtotime("+10 day"));
echo date("Y-m-d H:i:s",strtotime("-10 day"));