Morning,
I have been trying unsuccessfully to make this work. I know it is how I have the brackets but I can't seem to get it.
I want the result to look like this:
Owned
18900s trailer
284s trailer
910s trailer
Total 3
Leased
GHI trailer
PAC trailer
Total 2
What I get is:
Owned
18900s trailer
Total 1
Leased
GHI trailer
Total 1
Heres the code WAYYY trimmed down so you can see the bracket structure: The way I have it here it will only loop through once.
while($row = mssql_fetch_row($result))
{
$myArray[$row[0]] = $row[1];
//now we expand it
while(list($DEPTCODE) = each($myArray))
{//table header row
{
//data row
//totals row
}
}
}
Please someone help! I'm at the end of my rope here :bemused:
Laura