Re: date format problem...
| From: | Matthew Leingang | Date: | Tue, 15 Aug 2000 10:33:31 +0000 |
| Subject: | Re: date format problem... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-11776@lists.php.net to get a copy of this message | ||
Use QUOTES around the date format string and NO %s. Viz.:
$time = date ("a M d, h:i p", $row["time"]);
GL,
Matt
----------------------------------------------------------------
Matthew Leingang 617/495-2171
Harvard University leingang@math.harvard.edu
Department of Mathematics "This signature needs no quote."
On Mon, 14 Aug 2000, Kurth Bemis wrote:
> hey all....
>
> i'm trying to format a date that i pull out of a mysql database.....heres
> the code at line 40
>
> 39. $dept = $row["dept"];
> 40. $time = date (%a %M %d, %h:%i %p, $row["time"]);
> 41. $body = $row["body"];
>
> and heres the error that i get when i call the page..
>
>
> Parse error: parse error, expecting `')'' in /www/juneandstorm/index.php3
> on line 40