Get date of tomorrow, day after, yesterday, day before - PHP | |||||||||||
How to get the date of tomorrow and day after, yesterday and day before in standard format ? What PHP function should I use to get these values ? | |||||||||||
| |||||||||||
Hi, Simple method how to get the date of tomorrow, yesterday, etc. is to use: $tomorrow = date( "Ymd", strtotime( "+1 days" ) ); $dayaftertomorrow = date( "Ymd", strtotime( "+2 days" ) ); $yesterday = date( "Ymd", strtotime( "-1 days" ) ); $daybeforeyesterday = date( "Ymd", strtotime( "-2 days" ) ); The date format can be modified, so you should get what you need. | |||||||||||
| |||||||||||
| |||||||||||
![]() ![]() ![]() ![]() | |||||||||||
2022 AnswerTabs | Terms | Contact us |