PHP add 1 month to date

后端 未结 6 1361
旧巷少年郎
旧巷少年郎 2020-12-19 15:23

I\'ve a function that returns url of 1 month before.

I\'d like to display current selected month, but I cannot use simple current month, cause when user clicks link

6条回答
  •  不知归路
    2020-12-19 15:56

    You can with the DateTime class and the DateTime::add() method:

    Documentation

提交回复
热议问题