On Wed, 23 May 2001 13:49, Jason Caldwell wrote:
> 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
for($x=0; $x<20; $x++)
{
$year = date("Y") + $x; // Shift bracket!
print($year . "\n");
}
--
David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA
It is fatal to live too long.
--
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]