Set Tables As Side By Side Instead Of Straight Down While Doing A While-loop
include 'inc.php'; $varVeh=$_POST['Veh_num'];  $sql_course='select course_num from hc_course'; $results_course=mysql_query($sql_course);  $sql_vehName='select  Veh_name from hc_veh
Solution 1:
Wrap the result in another table.
echo"<table>";
$count = 0;
$num_columns = 2;  // or 3while ($rc = mysql_fetch_array($results_course)) {
    if ($count++ % $num_columns == 0) {
        echo"<tr>";
    }
    echo"<td>";
    // previous table code hereecho"</td>";
    if ($count % $num_columns == 0) {
      echo"</tr>";
    }
}
if ($count % $num_columns > 0) {
  echo"</tr>";
}
echo"</table>";
Post a Comment for "Set Tables As Side By Side Instead Of Straight Down While Doing A While-loop"