> On Wed, 26 Feb 2003, 1LT John W. Holmes wrote: > > |You would think strtotime("first of next month") would work, but it doesn't. > |This does: > | > |$t = mktime(0,0,0,date('m')+1,1,date('Y')); > | > |Gives you timestamp of first day, next month. Format accordingly with > |date(). > > Thats great, worked perfectly! Thank you very much :) > > Heres a tough one, is there such a say to now get the date of the first > weekday after that date?
Use the w option of date() and loop through adding 86400 to $t until you get to a number between 1 and 5. w - day of the week, numeric, i.e. "0" (Sunday) to "6" (Saturday) -philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php