Re: Date (Year) .. adding..
| From: | mheumann at sei dot cl | Date: | Wed, 23 May 2001 12:19:57 +0000 |
| Subject: | Re: Date (Year) .. adding.. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-54024@lists.php.net to get a copy of this message | ||
Hi Jason,
You might want to put the '+$x' outside the date().
$year = date("Y") + $x;
Greetings,
Michael.
> 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
#########################################################
# Michael Heumann
# S&I Chile - Software e Informatica Limitada
# Arlegui 440, Of. 403, Viña del Mar, Chile
# Fonofax: (56)(32) 710833
# Email: mheumann@softwareinformatica.cl
# Web: http://www.softwareinformatica.cl
#########################################################