RE: could anyone please help me with this date coding?
| From: | Tim Ward | Date: | Wed, 14 Feb 2001 11:17:01 +0000 |
| Subject: | RE: could anyone please help me with this date coding? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-39609@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Charles Mulford [mailto:cmulford@splitrock.net]
> Sent: 13 February 2001 22:56
> To: PHP User Group
> Subject: could anyone please help me with this date coding?
>
>
> Hi all! could anybody help me? I am fairly new to PHP and I
> inherited these
> scripts from someone who doesn't work with me anymore. They
> seem to puke on
> this portion while running them on win2k, latest php4 and
> mysql. On Linux
> platform they work as they are supposed to.
> thanks in advance!
>
> Charles Mulford
>
> -------------------------
>
> $max_date = 90;
> $ini_date = 0;
> echo("\t<OPTION VALUE=\"NULL\"> </OPTION>\n");
> do {
> $dis_date = date("D\. M\. d\, Y", strtotime ("+$ini_date day"));
> $val_date = date("Y-m-d", strtotime ("+$ini_date day"));
> echo("\t<OPTION VALUE=\"'$val_date'\">[$ini_date]
this looks wrong, in effect you're outputting value = "'2001-02-14'"
try just ...
echo("\t<OPTION VALUE=\"$val_date\">[$ini_date]
> $dis_date</OPTION>\n");
> }
> while (++$ini_date <= $max_date);
>
> -------------------------
>
Tim Ward
Senior Systems Engineer
Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html