I have two rows of table data. The first row displays multiple rows of data which it displays correctly.
The second row of table data should only display once, but it displays multiple times. For example, when the first row displays 10 rows, then the second row will appear once under each of the 10 rows.
Is there a way for it to only display once, below the first row of results?
Sara
echo "<table cellpadding=\'2\' cellspacing=\'0\'>";
echo "<tr>";
echo "<td class=\"th\" >COL1</td>";
echo "<td class=\"th\" >COL2</td>";
echo "<td class=\"th\" >COL3</td>";
echo "</tr>";
$rowcount = 0;
$group1_current_row = 0;
$group2_current_row = 0;
$group3_current_row = 0;
$group4_current_row = 0;
$group5_current_row = 0;
$grouptotal_current_row = 0;
$isStart01 = 0;
$isStart02 = 0;
$isStart03 = 0;
$isStart04 = 0;
$isStart05 = 0;
while ($row = mysql_fetch_array($result)) {
if ($rowcount == 0) {
}
$newgroupindex = -1;
echo "<tr>";//this row displays multiple rows
if (($rowcount%2) == 0) {
$css_class = "\"one\"";
} else {
$css_class = "\"two\"";
}
$cellvalue = "" . $row[1] . "";
if ($cellvalue == "") {
$cellvalue = " ";
}
echo "<td class=" . $css_class . " align=Default >" . $cellvalue . "</td>";
$cellvalue = "" . $row[2] . "";
if ($cellvalue == "") {
$cellvalue = " ";
}
echo "<td class=" . $css_class . " align=Default >" . $cellvalue . "</td>";
$cellvalue = "" . $row[3] . "";
if ($cellvalue == "") {
$cellvalue = " ";
}
echo "</tr>";
echo "<tr>";//this is the new row that should only display the row of data once
echo "<td class=" . $css_class . " align=Default >" . $cellvalue . "</td>";
$cellvalue = "" . $row[4] . "";
if ($cellvalue == "") {
$cellvalue = " ";
}
echo "<td class=" . $css_class . " align=Default >" . $cellvalue . "</td>";
$cellvalue = "" . $row[5] . "";
if ($cellvalue == "") {
$cellvalue = " ";
}
echo "<td class=" . $css_class . " align=Default >" . $cellvalue . "</td>";
$cellvalue = "" . $row[6] . "";
if ($cellvalue == "") {
$cellvalue = " ";
}
echo "</tr>";
$newgroupindex = -1;
$rowcount = $rowcount + 1;
$isStart01++;
$isStart02++;
$isStart03++;
$isStart04++;
$isStart05++;
}
echo "</table>";