$result = mysql_query("SELECT * FROM $table ORDER BY ID", $db);
:...
function timestamp_php($date)
{
$year = substr($date,0,4);
$month = substr($date,4,2);
$day = substr($date,6,2);
$hour = substr($date,8,2);
$minute = substr($date,10,2);
$second = substr($date,12,2); //below must be in this order
$datetime = mktime($hour,$minute,$second,$month,$day,$year);
return $datetime;
}
while( $myrow = mysql_fetch_array($result) )
{
$the_date = $myrow[lastDate];
$newtime1 = timestamp_php($the_date);
$newtime2 = date('l F jS, Y -- g:ia T', $newtime1);
echo $newtime2
//which prints: Sunday November 23rd, 2003 -- 7:01am PST
}