$r[title]

"; print "

$r[data]

\n

Article by "; print "

"; } else { print "Archived Articles:
    \n"; $q = mysql_query("SELECT id, title, data, date, author FROM news ORDER BY date DESC") or error(mysql_error()); while ($r = mysql_fetch_array($q)) { #ereg("([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})", $r[date], $regs); #$date = sprintf("%02d/%02d/%04d at %02d:%02d:%02d", $regs[3],$regs[2],$regs[1],$regs[4],$regs[5],$regs[6]); print "
  1. $r[title] (by $r[author] on $r[date])\n"; } print "
\n"; } ?>