include "function.php";
include "connect.php";
for ($i=1;$i<=count($newtype);$i++) {
echo "<img src='/imgnews/$i.jpg' width='597' height='38'>";
echo "<UL>";
$sql="select * from tb_new where type_new='$i' ";
$result=mysql_db_query($dbname,$sql);
$total=mysql_num_rows($result);
$sql="select * from tb_new where type_new='$i' order by id_new desc limit 0,5" ;
$result=mysql_db_query($dbname,$sql);
while($r=mysql_fetch_array($result)) {
$id_new=$r[id_new];
$title_new=$r[title_new];
$type_new=$r[type_new];
$date_new=displaydate($r[date_new]);