PHP date; How to find the next year?

前端 未结 8 1701
生来不讨喜
生来不讨喜 2021-01-07 18:27

I want to get today\'s date + one year. How do I achieve this with PHP\'s date functions?

8条回答
  •  北荒
    北荒 (楼主)
    2021-01-07 18:37

    Best and easy solution... You can change month or year or day.

    date('Y-m-d',strtotime("+1 day +2months +1 year"));
    

提交回复
热议问题