amrigo
01-18-2006, 05:15 AM
Hi
I have a list of 110 cityes and i would like to know how to display them in a two column table ordering alphabetically. HJoww can it be done ?
Here is my code displaying just in one column:
$sql = "SELECT * FROM city"
." WHERE txt_region = 3"
." ORDER BY txt_name";
$rs=new query($conn,$sql);
$tot_rows = $rs->numrows();
if($tot_rows>0){
$division = floor($tot_rows/2);
echo $division;
echo "<TABLE>";
$i = 0;
while($rs->getrow()){
$i++;
echo "<TR><TD class='menusolo'>".$rs->field("txt_name")."</TD></TR>";
}
echo "</TABLE>";
}
I have a list of 110 cityes and i would like to know how to display them in a two column table ordering alphabetically. HJoww can it be done ?
Here is my code displaying just in one column:
$sql = "SELECT * FROM city"
." WHERE txt_region = 3"
." ORDER BY txt_name";
$rs=new query($conn,$sql);
$tot_rows = $rs->numrows();
if($tot_rows>0){
$division = floor($tot_rows/2);
echo $division;
echo "<TABLE>";
$i = 0;
while($rs->getrow()){
$i++;
echo "<TR><TD class='menusolo'>".$rs->field("txt_name")."</TD></TR>";
}
echo "</TABLE>";
}