
09-26-2007
|
| Administrator
Join Date: Jun 2007
Posts: 3,729
BRL$: 35,109.00 Thanks: 0
Thanked 7 Times in 7 Posts
Rep Power: 406 | | Multiple Table Rows in "while" loop 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? Is it even possible to have multiple tables in a "while" loop? To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts. Sara PHP: --------- echo ""; echo ""; echo "COL1"; echo "COL2"; echo "COL3"; echo ""; $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 "";//this row displays multiple rows if (($rowcount%2) == 0) { $css_class = "\"one\""; } else { $css_class = "\"two\""; } $cellvalue = "" . $row[1] . ""; if ($cellvalue == "") { $cellvalue = " "; } echo "" . $cellvalue . ""; $cellvalue = "" . $row[2] . ""; if ($cellvalue == "") { $cellvalue = " "; } echo "" . $cellvalue . ""; $cellvalue = "" . $row[3] . ""; if ($cellvalue == "") { $cellvalue = " "; } echo ""; echo "";//this is the new row that should only display the row of data once echo "" . $cellvalue . ""; $cellvalue = "" . $row[4] . ""; if ($cellvalue == "") { $cellvalue = " "; } echo "" . $cellvalue . ""; $cellvalue = "" . $row[5] . ""; if ($cellvalue == "") { $cellvalue = " "; } echo "" . $cellvalue . ""; $cellvalue = "" . $row[6] . ""; if ($cellvalue == "") { $cellvalue = " "; } echo ""; $newgroupindex = -1; $rowcount = $rowcount + 1; $isStart01++; $isStart02++; $isStart03++; $isStart04++; $isStart05++; } echo ""; --------- To view links or images in this forum your post count must be 1 or greater. You currently have 0 posts. | |
__________________ █ High Quality To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
█ Powerful To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
█ To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
To receive latest updates about BRL Forums, Subscribe to Latest Updates Thread.
| | | |