Posted by TristaSD on 09/28/88 11:48
Thank for the inspiration. I used this:
$num_across = 2; // Two column layout
echo ("<tr>\n"); // Start the row
while ($row = mysql_fetch_array($query)) {
$i++; // Start the counter
if (($i % $num_across) == 0) { // If the last column is reached
echo "<td>$row[somename]</td></tr>\n<tr>\n"; // Close/open row
}
else {
echo "<td>$row[id]</td><td>$row[artist]</td>"; // Otherwise just
show some cells
}
}
?>
</table>
Thanks.
Navigation:
[Reply to this message]
|