nice script, it's one of mine, where did you get it from?
the answer:
PHP Code:
<?php
error_reporting(7);
require('./global.php');
$news = $DB_site->query("SELECT post.title, post.pagetext,post.postusername,post.dateline FROM post WHERE post.threadid = XX ORDER BY post.postid DESC LIMIT 5");
print("<table width='95%' align='center' cellspacing=0>");
$lastdate="";
while($newstext=$DB_site->fetch_array($news)) {
print("<tr>");
//if(date("d.m.Y",$newstext[dateline])!=$lastdate) {
//print(date("d.m.Y",$newstext[dateline])); }
$lastdate=date("d.m.Y",$newstext[dateline]);
print("<th class='head' align='left' bgcolor='#FFFFFF".$headcolor."'><font size=1>".date("d.m.Y - H:i:",$newstext[dateline])."</font><br>".$newstext[title]."</th>");
print("<th class='head' align='right' bgcolor='#FFFFFF".$headcolor."'>".$newstext[postusername]."<br><font size=1><a href='http://forums.khabal.com/showthread.php?s=&threadid=".$new[threadid]."'>Comments(".$new[replycount].")</a></font></th></tr>");
print("<tr></tr><tr><td class=news colspan='2' bgcolor='#FFFFFF".$newscolor."'>".bbcodeparse2($newstext[pagetext],1,1,1,1)."</td>");
print("</tr><tr><td height=5></td></tr>");
}
print("</table>");
?>