php - add + 7 days to date format mm dd, YYYY

前端 未结 7 444
野的像风
野的像风 2021-01-31 01:48

I have date of this format March 3, 2011 in database and I need to extend it with 7 days. I mean

 $date = $date + 7
. Is there any build in function to do that ?

相关标签:
7条回答
  • 2021-01-31 02:32

    yes

    $oneweekfromnow = strtotime("+1 week", strtotime("<date-from-db>"));
    

    on another note, why do you have your date in the database like that?

    0 讨论(0)
提交回复
热议问题