Thanks, I knew it was something stupid!

However, the $dy = date ("D", $row[0]) doesn't work.

"* R&Ze:" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> <Original message>
> From: Paul McGee <[EMAIL PROTECTED]>
> Date: Thu, Aug 30, 2001 at 12:13:21PM -0400
> Message-ID: <[EMAIL PROTECTED]>
> Subject: [PHP] Date formatting in PHP 3.0
>
> > I'm looping through a MSQL db pulling out the dates where I would like
to
> > display the date and then the day of the week.  The problem is that
every
> > date returns the same day of the week, Wed. I checked the documentation
and
> > it doesn't say anything about the expression only being executed once
during
> > inside the WHILE loop.
> >
> > I've tried:
> >
> > $m = substr($row[0],0,4);
> > $d = substr($row[0],5,2);
> > $y = substr($row[0],8,2);
> > $dy = date ("D", mktime(0,0,0,$m,$d,$y));
> >
> > and just using the date field
> >
> > $dy = date ("D", $row[0]);
> >
> > Any help would be greatly appreciated!
>
> </Original message>
>
> <Reply>
>
> Did you give a look at your own code?
> A month consisting of 4 digits?
> And a year consisting of 2 digits?
> I'd say:
>
> --- PHP code ---
> $y = substr($row[0],0,4);
> $m = substr($row[0],5,2);
> $d = substr($row[0],8,2);
> $dy = date ("D", mktime(0,0,0,$m,$d,$y));
>
> and just using the date field
>
> $dy = date ("D", $row[0]);
> --- End of PHP code ---
>
> </Reply>
>
> --
>
> * R&zE:
>
> </Reply>
>
> --
>
> * R&zE:
>
>
> -- »»»»»»»»»»»»»»»»»»»»»»»»
> -- Renze Munnik
> -- DataLink BV
> --
> -- E: [EMAIL PROTECTED]
> -- W: +31 23 5326162
> -- F: +31 23 5322144
> -- M: +31 6 21811143
> --
> -- Stationsplein 82
> -- 2011 LM  HAARLEM
> -- Netherlands
> --
> -- http://www.datalink.nl
> -- ««««««««««««««««««««««««



-- 
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]

Reply via email to