as seen in the pic a table. I have the following im trying to fill the boxes based on rows. So line one will fill by the correct ordergoing left to right then down. here is my code.
$results = mysqli_query($con, " SELECT * FROM PMAsset Order by Linenum, LineOrder") or die(mysqli_error($con));
while($row = mysqli_fetch_array($results)) {
?>
<tr>
<td bgcolor="aabbcc"><center><?php echo $row['LineNum']?></td>
<td Bgcolor=<?php echo $row['PMStatus']?>></td>
<td Bgcolor=<?php echo $row['PMStatus']?>></td>
<td Bgcolor=<?php echo $row['PMStatus']?>></td>
<td Bgcolor=<?php echo $row['PMStatus']?>></td>
<td Bgcolor=<?php echo $row['PMStatus']?>></td>
<td Bgcolor=<?php echo $row['PMStatus']?>></td>
<td Bgcolor=<?php echo $row['PMStatus']?>></td>
<td Bgcolor=<?php echo $row['PMStatus']?>></td>
<td Bgcolor=<?php echo $row['PMStatus']?>></td>
<td Bgcolor=<?php echo $row['PMStatus']?>></td>
</tr>
<?php
}
?>
I know im missing a loop but not sure how or where to do it. I want the boxes to sort by Line number then lineorder. then if line is 2 drop to next boxes ect. I have to allow for 10.
Suggestions to help along the way. im close just not understanding the loop