I am retrieving data from my DB and constructing it into a dynamic table. This I know how to do. What I'm having trouble figuring out is how to code the table so it will be only so many columns wide before it starts a new row. This is my logic so far:
WHILE loop through my query
COUNT the total number of records being retrieved
DIVIDE the COUNT by the number of columns I want in the table
FOR loop through the DIVIDED count
PRINT out the data in a row while in the FOR loop
GOTO the next FOR LOOP for the next table row
How am I doing so far?? Could someone help piece this together? My main problem is I don't know how to go from one FOR loop (first row) to the next one. I figure I need to capture it into an array and loop certain portions of the array at different times, right????