ChrisMartino Posted April 16, 2010 Share Posted April 16, 2010 Hello there, I'm trying to figure how how to do this, Basically if you are given a variable that is named '$days', And that variable contains a number, For example the number 60, Now using php's date function how would i be able to get the date 60 days in the future?. Thanks for your time, Chris. Quote Link to comment https://forums.phpfreaks.com/topic/198774-php-date-help/ Share on other sites More sharing options...
Ken2k7 Posted April 16, 2010 Share Posted April 16, 2010 $future = mktime(0, 0, 0, date("m") , date("d")+$days, date("Y")); Quote Link to comment https://forums.phpfreaks.com/topic/198774-php-date-help/#findComment-1043211 Share on other sites More sharing options...
ChrisMartino Posted April 16, 2010 Author Share Posted April 16, 2010 $future = mktime(0, 0, 0, date("m") , date("d")+$days, date("Y")); Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/198774-php-date-help/#findComment-1043222 Share on other sites More sharing options...
Lamez Posted April 16, 2010 Share Posted April 16, 2010 $future = mktime(0, 0, 0, date("m") , date("d")+$days, date("Y")); How would i use that? :/ $future is the day that is $days away from today if $days = 5 then $future = today+5 days. I think. Quote Link to comment https://forums.phpfreaks.com/topic/198774-php-date-help/#findComment-1043225 Share on other sites More sharing options...
ChrisMartino Posted April 16, 2010 Author Share Posted April 16, 2010 $future = mktime(0, 0, 0, date("m") , date("d")+$days, date("Y")); How would i use that? :/ $future is the day that is $days away from today if $days = 5 then $future = today+5 days. I think. Thanks dude! Quote Link to comment https://forums.phpfreaks.com/topic/198774-php-date-help/#findComment-1043226 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.