I have abt 300 records in the resultset. I would like to display say 12 in a row. I tried using another variable j in the for loop but wasnt able to get to make a new <tr>. they still got displayed in a new row.
Thanks a lot Jiju for the solution. Caleb I did the same thing u were suggesting, but that printed each record 12 times. I guess the bigger picture of this solution is to analyze for the 3 different situations firstRow, newRow and last Row. Based on that check whether u r closing and opening the tags appropriately. Thanks again Jiju.
Joined: Oct 12, 2004
Caleb's solution will also work. The solution will work if you do the following.
1. i should be incremented by 12. i++ just increments by 1. 2. index of the array should be computed by adding i to j. 3. Precaution should be taken to limit i+j within array size so that Index Out of Bound Exception will not occur.