Re: Adding days to a date

From: Date: Tue, 12 Aug 2003 19:53:50 +0000
Subject: Re: Adding days to a date
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-159320@lists.php.net to get a copy of this message
From: "Donpro" <donpro@lclnav.com> > I have a piece of code like so: > > $today =- getdate(); > > I am looking for a function that will add a variable number of days and > return a valid date, i.e., the array elements for "mday", "mon" and > "year" > are reset as needed. Is this possible? $tomorrow = getdate(strtotime('+1 day')); $num_days = 5; $any_day = getdate(strtotime("+$num_days day")); ---John Holmes...

« previous php.general (#159320) next »