Increase current date by 5 days

后端 未结 11 2033
执笔经年
执笔经年 2021-01-02 16:57
$date = date(\'Y-m-d\',current_time(\'timestamp\', 0));

How do I change $date to $date + 5 days?

PHP version is 5

11条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-02 17:16

    Did not supposed to be like this?

    $date_cur = date('Y-m-d', current_time('timestamp', 0));
    echo $date_cur . ' 
    '; $date_cur_plus = date('Y-m-d', strtotime('+5 days', current_time('timestamp', 0) ) ); echo $date_cur_plus;

提交回复
热议问题