Morning,
I can't seem to make this display like I want:
echo "<TABLE class='table'>"; while($row = mssql_fetch_row($result)) { $myArray[$row[0]] = $row[1];
//now we expand it
while(list($bodytype) = each($myArray)) {
echo "<tr class=tr><td colspan=4><b>$bodytype</b></td></tr>"; //table header row
echo "<tr class=tr><th></th></tr>";
//for the sake of clarity the rest of rows removed
}
//data row
echo "<tr class=tr>";
echo "<td>$row[1]</td>";
//for the sake of clarity the rest of rows removed
echo "</tr>";
//allocations row
echo "<tr class=tr>";
echo "<td>Allocation</td>";
echo "<td>$row[22]</td>";
//for the sake of clarity the rest of rows removed
echo "</tr>";
}
echo "</table>";
This is what happens:
Specialty
MT Strip Door
06/29/2005 126 19 17
Allocation 110 12 9
06/30/2005 131 21 18
Allocation 105 12 9
What I want to happen is this:
Specialty
MT Strip Door
06/29/2005 126 19 17
06/30/2005 131 21 18
Allocation 105 12 9
I know its the brackets but I can't seem to get it right. Can anyone point me in the right direction?
Thanks so much.
Laura