You can see the final output at http://acidvat.com/av2/index.php
<?php
$pagetitle .= "News";
$getnews = mysql_query_2("SELECT * from `items` WHERE `cat`=21 AND `chkd`='1' ORDER BY `id` DESC");
while ($news = mysql_fetch_array($getnews)) {
$getbody = mysql_query_2("SELECT * from `comments` WHERE `id`=$news[firstcomment]");
$body = mysql_fetch_array($getbody);
$getmember = mysql_query_2("SELECT * from `members` WHERE `id`=$body[bymember]");
$poster = mysql_fetch_array($getmember);
$getcat = mysql_query_2("SELECT * from `cats` WHERE `id`=$news[cat]");
$incat = mysql_fetch_array($getcat);
$numcomments = mysql_query_2("SELECT inreplyto FROM comments WHERE inreplyto=$news[firstcomment]");
$numcomments = mysql_num_rows($numcomments);
$newsdate = date("j M y", $news[date]);
$postersicon = groupicon($poster[group]);
$content .= "
<div align=center>
<table border=0 cellpadding=5 cellspacing=1 width=100% id=topback>
<tr>
<td valign=top width=80% id=newscell><strong>$news[title]</strong><br />
Written by $postersicon<a href=index.php?view=member&name=$poster[name]>$poster[name]</a><br />
$newsdate, in <a href=index.php?$news[cat]>$incat[title]</a></td>
<td align=right valign=top width=20% id=newscell><a href=index.php?view=member&name=$poster[name]>Posters Avatar</a></td>
</tr>
<tr>
<td valign=top width=80%>$body[thecomment]</td>
<td align=right valign=top width=20%>$news[prev] & $news[prev2]</td>
</tr>
<tr>
<td valign=top width=80% id=newscell><a href=index.php?$news[firstcomment]>Read the Full Story</a></td>
<td align=right valign=top width=20% id=newscell><a href=index.php?$news[firstcomment]>$numcomments comments</a></td>
</tr>
</table>
</div>
<br />
<br />
<br />
";
}
?>
or anyone have a link to a tutorial about outputing to flat files?
Edited by Detail, 25 November 2005 - 02:24 PM.