Re: Adding +7 more days on date() value problem

From: Date: Wed, 28 Jul 2004 04:13:57 +0000
Subject: Re: Adding +7 more days on date() value problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-192063@lists.php.net to get a copy of this message
Definately check out strtotime() function, way easier than adding up the seconds of a timestamp, or breaking apart a getdate array. Jason On Wed, 28 Jul 2004 11:30:42 +0800, Louie Miranda <lmiranda@gmail.com> wrote: > I can't figure how could i add +7 more days on the DD (Day) value. My > problem is, when the day is close on the end of the month like > > 07/29/2004 > > when i add +7 on 29 = 36, its obvious we dont have 36 on the calendar. > And im creating a program below, to explode it and maybe just add +. > But i think its useless if im just going to do + on the DD (Day) > value. > > Hmm :? > > ## > <?php > $curdate = date("Y-m-d"); > $plus7 = explode("-", $curdate); > > print (" > <p>cut: > " .$plus7[0]. " > " .$plus7[1]. " > " .$plus7[2]. " > </p> > > Current Date: $curdate<br> > +7 Dats Date: $plus7 > > "); > ?> > ## > > -- > Louie Miranda > http://www.axishift.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#192063) next »