I am trying to get the date printed in a html output, which is pulled from mysql db. With my current code, the date result comes out blank, no errors or anything (but everything else works). I'm fairly new to this so dont flame me if its a simple mistake. I havent been able to find a solution in any documentation or other help threads. Heres the code.
function showThenews() {
$timestamp = dbQuery("SELECT DATE_FORMAT(timestamp,'%W, %D, %M, %Y') FROM Thenews AS timestamp");
$ThenewsQuery=dbQuery("SELECT * FROM Thenews ORDER BY id DESC");
while ($Thenews = mysql_fetch_array($ThenewsQuery)) {
?>
<table border="0" width="100%">
<tr>
<td width="100%">
<p align="center"><?=$Thenews[title]?> - <? echo $timestamp[timestamp] ?></td>
</tr>
<tr>
<td width="100%"><?=$Thenews[text]?>
</td>
</tr>
</table>
<br>
<?
}
}