bradkenyon Posted September 23, 2008 Share Posted September 23, 2008 I have $todays_date = date("Y-m-d"); it says 2008-09-23 I want to add to the day, so it will be 2008-09-24 How do I go about that? Link to comment https://forums.phpfreaks.com/topic/125508-solved-add-to-day-of-date/ Share on other sites More sharing options...
F1Fan Posted September 23, 2008 Share Posted September 23, 2008 strtotime("$todays_date +1 day"); Link to comment https://forums.phpfreaks.com/topic/125508-solved-add-to-day-of-date/#findComment-648877 Share on other sites More sharing options...
bradkenyon Posted September 23, 2008 Author Share Posted September 23, 2008 Thanks, tried it out. $today = date("Y-m-d"); $todays_date = strtotime("$today +1 day"); printed out: 1222228800 must be doing something wrong. Link to comment https://forums.phpfreaks.com/topic/125508-solved-add-to-day-of-date/#findComment-648901 Share on other sites More sharing options...
discomatt Posted September 23, 2008 Share Posted September 23, 2008 A 'better' way to do it would be $tomorrow = date( "Y-m-d", time()+86400 ); Link to comment https://forums.phpfreaks.com/topic/125508-solved-add-to-day-of-date/#findComment-648923 Share on other sites More sharing options...
bradkenyon Posted September 23, 2008 Author Share Posted September 23, 2008 perfect. thanks! Link to comment https://forums.phpfreaks.com/topic/125508-solved-add-to-day-of-date/#findComment-648930 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.