Hello Richard, Wednesday, March 31, 2004, 10:14:39 AM, you wrote:
JW> strtotime() can do more than that, time to RTFM. RH> What else can it do other than convert dates to time strings Jason? I have to agree with Jason on this one - the following code is just reinventing the wheel: $timeStamp = strtotime("2004-04-29"); $timeStamp += 24 * 60 * 60 * 7; // (add 7 days) $newDate = date("Y-m-d", $timeStamp); This is a very long winded way of getting the resulting date when you can simply do this: $newDate = strtotme("+7 day", time()); If you want it based on the current time the above will work, or just replace time() with any other valid timestamp you may have. Look at the manual entry for it for lots of other examples. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php