djones Posted June 14, 2010 Share Posted June 14, 2010 Cannot get my brain around what strtotime it looking for. I need to echo the same day for each month for the next 12 months. This is not working. for($i=0; $i<=12; $i++){ $date = date("Y-m-d", strtotime('17 +'.$i.' months')); echo $date.'<br />'; } Link to comment https://forums.phpfreaks.com/topic/204777-help-with-strtotime/ Share on other sites More sharing options...
nblackwood Posted June 14, 2010 Share Posted June 14, 2010 Could you please be a little more specific. What do you mean by "same day for each month" Link to comment https://forums.phpfreaks.com/topic/204777-help-with-strtotime/#findComment-1072091 Share on other sites More sharing options...
MatthewJ Posted June 14, 2010 Share Posted June 14, 2010 for($i=0; $i<=12; $i++){ $date = date("Y-m-d", strtotime('+ '.$i.' months')); echo $date.'<br />'; } Link to comment https://forums.phpfreaks.com/topic/204777-help-with-strtotime/#findComment-1072093 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.