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. 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")); 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! 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. 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! Link to comment https://forums.phpfreaks.com/topic/198774-php-date-help/#findComment-1043226 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.