Date formatting in PHP 3.0
| From: | Paul McGee | Date: | Thu, 30 Aug 2001 16:13:21 +0000 |
| Subject: | Date formatting in PHP 3.0 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-65316@lists.php.net to get a copy of this message | ||
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!