PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm trying to write a script that converts a unix timestamp to date time, with php, and displays it along with the title it's corresponding article. Now matter how hard, or how many different combinations, I try I can't get it to work and keep getting prompted with the same Prase Error. Can anyone look at the script and error pasted below and point me in the right direction? Thanks for the help.
<?php
// Standard functions
require('functions.php');
// Connect to the database
database_connect('Admin');
// Set up the query and run it
$sql = "SELECT * FROM `cmsarticles` LIMIT 0, 5 ";
$result = mysql_query($sql) or die(mysql_error());
// Start echo of list
echo'<ul>';
while ($row = mysql_fetch_array($result)) {
$timestamp = $row['date'];
$timestamp = date(F d Y,$timestamp);
echo'<li><h3>' . $timestamp . '</h3><p><a href="../admin/viewarticle.php?id=' . $row['ID'] . '">' . $row['title'] . '</a></p></li>';
}
echo'</ul>';
?>