Okay, so I need to use PHP to obtain the date of the next occurrence of the 18th.
For example, let's say I ran my script on Dec. 28th, 2011. I would need some code that would be able to spit out 2012-开发者_JAVA技巧01-18. If it were April 9th, 2011, I would need the code to spit out 2011-04-18. Make sense?
Any ideas?
This should give you the next occurrence of the 18th
$nextDay = 18;
$nextDate = (date('d') > $nextDay) ? date('Y-m', strtotime('+1 month')).'-'.$nextDay : date('Y-m').'-'.$nextDay;
精彩评论