// get the number of results that are returned by the query
$totalrows = $oSQL->DBRowCount($DBResource);
// load the result into an array
while ($row = $oSQL->DBFetchArray($DBResource);) {
$result[] = $row;
}
// calculate how many table rows we need to display all results
$rowstoprint = $totalrows / 2 ;
// make a loop to output every html row of the table
for ($i=0;$i < $totalrows /2 ;$i++){
// second counter - calculate the right index for the right column
$j = $i + $rowstoprint;
echo "<tr><td>";
if ($result[$i]['Email'] != "" ) {
echo "<a href="mailto:$result[$i]['Email']">";
}
echo "$result[$i]['FirstName'] $result[$i]['LastName']</td><td>"
if ($result[$j]['Email'] != "" ) {
echo "<a href="mailto:$result[$j]['Email']">";
}
echo "$result[$j]['FirstName'] $result[$j]['LastName']</td></tr>";
}
Last edited by Astaran; 01/20/2004 2:42 PM.