When I do this:
PHP Code:
$query = 'SELECT UNIX_TIMESTAMP(entrydate), entrytitle, entrytext FROM weblog2 ORDER BY entrydate DESC LIMIT 10';
while ($row = mysql_fetch_array ($r)) {
$datetime = date("F j, Y, g:i a", {$row['entrydate']);
print "<p><br><b>{$row['entrytitle']}</b></p>
<p>{$row['entrytext']}</p>
<p>$datetime</p>";}
I get a parse error for the line with the date() function in it.
When I do this:
PHP Code:
$query = 'SELECT UNIX_TIMESTAMP(entrydate), entrytitle, entrytext FROM weblog2 ORDER BY entrydate DESC LIMIT 10';
while ($row = mysql_fetch_array ($r)) {
$datetime = date("F j, Y, g:i a", $entrydate);
print "<p><br><b>{$row['entrytitle']}</b></p>
<p>{$row['entrytext']}</p>
<p>$datetime</p>";}
...it prints the date as December 31, 1969, 4:00 pm.
