I'm assuming you want an out put like...
<table>
<tr>
<td>value 1</td><td>value 2</td>
</tr>
<tr>
<td>value 3</td><td>value 4</td>
</tr>
</table>
If that's the case then you'll need and if statement inside your while loop...
require('connect.php');
/* Performing SQL query */
$query = "SELECT * FROM directory";
$result = mysql_query($query) or die("Query failed: ". mysql_error());
/* Printing results in HTML */_
$i=0; // Increments in the while for different columns
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
if ($i%2==0) {
// $i is even
echo " <tr>\n";
echo " <td>".$line["business_type"]."</td>\n";
} else {
// $i is odd
echo " <td>".$line["business_type"]."</td>\n";
echo " </tr>\n";
}
// Increment $i
$i++;
}
echo "</table>\n";
/* Free resultset */
mysql_free_result($result);
I removed the $colA and $colB variables, because your code was assigning them the same value. You could make a variant of this code to do more than two columns as well. For each additional column you'll need a need ifelse clause.