Code:
$result = mysql_query("SELECT * FROM cities ORDER BY city_name") or die ("Failed.".mysql_error());
$num_rows = mysql_num_rows($result);
$x = 0;
$num_cols = 4;
print '
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" WIDTH="100%">
<TR>
<TD VALIGN="TOP">';
while($row = mysql_fetch_array($result)) {
print $row['city_name']. '<BR>';
$x++;
if ($x == ceil($num_rows / $num_cols)) {
print '
</TD>
<TD VALIGN="TOP">';
$x = 0;
}
}
print '
</TD>
</TR>
</TABLE>';
$num_cols is the number of columns you want....
Philco