RE: [PHP] Date (Year) .. adding..

From: Date: Wed, 23 May 2001 04:30:51 +0000
Subject: RE: [PHP] Date (Year) .. adding..
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-53980@lists.php.net to get a copy of this message
<? $x=0; $year = date("Y"); while($x < 20) { $year = $year+1; print($year . "\n"); $x++; } ?> Try that. Tyler > -----Original Message----- > From: Jason Caldwell [mailto:jason@thinkingman.org] > Sent: Tuesday, May 22, 2001 11:20 PM > To: php-general@lists.php.net > Subject: [PHP] Date (Year) .. adding.. > > > I'm trying to figure out how to add to the year: > > for($x=0; $x<20; $x++) > { > $year = date("Y" + $x); > print($year . "\n"); > } > > I've tried several variations on the above and cannot get the year to come > out. > > Any suggestions? > > Thanks > Jason > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#53980) next »