date plus 7 more days
| From: | Jacky | Date: | Tue, 24 Apr 2001 14:14:44 +0000 |
| Subject: | date plus 7 more days | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-49988@lists.php.net to get a copy of this message | ||
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. Is this sniplet below okay?
**************
$First = "$year" . "$month" . "$date";
for ($i=1; $i < 9 ; ++$i){
$First = $First + 7 ;
}
*******************
cheers
Jack
jacky@activelifestyle.com
"There is nothing more rewarding than reaching the goal you set for yourself"