I want to write a scrip that displays data in a list form. However I just want it to display 75 items and then create a new column (basically another cell in a one row HTML table) to display the data.
I've tried two ways to create this but for some reason the inner loop doesn't work.
$max is the number of columns that will be created and this does work. Assume for now that $max = 2 so I want 2 columns created.
$info = mysql_query("SELECT * FROM data WHERE id > 30 ORDER BY id ASC LIMIT 75");
echo "<TABLE width=650>";
for ($counter=0; $counter < max; $counter++)
{
echo "<TD>";
for ($count=1; $count < 75; $count++)
{
$result = mysql_fetch_row($info);
print $result[0];
print $result[1];
print $result[9];
}
echo "</TD>";
}
The print commands never work. I've always tried just printing things in the inner loop but it just skips over anything in there. I've also tried a variation like this
while ($result = mysql_fetch_row($info);
{
blah
}
but that doesn't work either.
Why is the inner loop being ignored?