ok my goal is the following: I have articles in a database.
I want to display 3 of them besides each other. after that it should create a new <tr> and display the next 3 items.
here is what I did, but it doesn't work.
any ideas?
$result = mysql_query("select * from articles2 WHERE approve=0 order by id desc") or die ("could not read news database");
$num =mysql_num_rows($result);
$a = 0;
while ($row = mysql_fetch_array($result)) {
print "</tr>";
for ($i=($a + 3) ; $i<$num; $i++)
{
print "<td> </td><td align='center' valign='top' width='175'><font face=arial size=2";
$id = mysql_result($result, $i, "id");
$title = mysql_result($result, $i, "title");
$text = mysql_result($result, $i, "text");
$tt_img = mysql_result($result, $i, "tt_img");
$press_title = mysql_result($result, $i, "press_title");
print "<a href=\"articles.php?detail=$id\">";
print "<img src='$tt_img' width='230' height='150' border='0' ALT='$press_title'></a>";
print "</td><td width=10>aaa</td>";
}
print "</tr>";
}