//Store your states in an array, $states, and count them
$n = 0;
while ($row = mysql_fetch_array($query_result)) {
$states[] = $row['state'];
$n++;
}
// sort the array
sort ($states);
//if you want the 3 cols, div_point is number in each column
$div_point = floor(($n+2)/3);
for ($i=0; $i<$div_point; $i++) {
echo "<tr><td>$array[$i]</td>";
echo "<td>$array[$i + $div_point]</td>";
echo ""<td>$array[$i + $div_point * 2]</td></tr>" ;
}
So in your example of 11 states, div_point = 4 and the for loop puts
elements 0, 4, 8 in first row
1, 5, 9 in next row
2, 6, 10 in next row
3, 7, _ in last row
hth