Hi, thanks for the reply!
I have the code below with two table rows, but the second row won't display any data. How can I make both table rows work? 😕
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>";