Adding Days to a Date with PHP

前端 未结 3 526
滥情空心
滥情空心 2020-12-22 07:59

I am trying to add a certain amount of days to a set date in PHP. However, all of the code I use is not working. Here is the code I am currently experiencing problems with:<

3条回答
  •  情歌与酒
    2020-12-22 08:49

    It must be like this:

    $NewDate = date('Y-m-d', strtotime("2013-12-01" . " +7 days"));
    echo $NewDate;                                   
    

提交回复
热议问题