hehe ... here I am again:

mySQL? if yes then do date+INTERVAL 8 DAYS.

PHP? then convert everything into UNIX timestamp with mktime() and do a plus
of (60*60*24 for each day) and then reconvert it back into the time format
you want.

Sincerely, 

 Maxim Maletsky
 Founder, Chief Developer
 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com

 

-----Original Message-----
From: Jacky [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 11:27 PM
To: [EMAIL PROTECTED]
Subject: [PHP] date add more 7 days, help needed.


Hi all
I have variable that store date like this :
$First = "$year" . "$month" . "$date"; ( which return 20010201 for Feb
1,2001) . 
I wanna do the loop 8 times that will add 7 more days to the begining date
and keep adding it for 8 times. The looping thing is okay but I am not sure
if I simply plus 7 on top of date value will give me the date value I want
to have. 
I try the sniplet below and it did not work, always return zero. What should
I do here???
**************
$First = "$year" . "$month" . "$date";
for ($i=1; $i  < 9 ; ++$i){
  $First = $First + 7 ;
}
*******************
cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to