require ("includes/dbconn.inc"); ?>
news $news_query=mysql_query("select * from news order by time desc"); $news_entries=mysql_num_rows($news_query); if ($news_entries>9) { for ($x=0; $x<10; ++$x) { $news_row=mysql_fetch_row($news_query); $date_and_time=$news_row[4]; $month=substr($date_and_time, 4, 2); $day=substr($date_and_time, 6, 2); echo "$month/$day $news_row[2] "; } } else { for ($x=0; $x<$news_entries; ++$x) { } } ?>
|
|
|