Hello,

I need to do something like mentioned below:

I have a table of 5 rows and 10 columns. I need to print the results (coming
from db) in the table. I have a loop for doing this. What I want to do is for
the first row, there are some columns filled(lets say 3,5,6) now in the next
iteration again for the same row i need to fill other columns (7,9,10). This
is how I try to do this,

$id = 1; //resetting the id here...

while($count != 0)
{
if (value = true)
{ ?><td id="<?php echo $id;?>"> Print value </td><?php
$id = $id + 1;
}
else { ?><td id="<?php echo $id;?>">&nbsp;</td><?php
$id = $id + 1;
}
$count = $count - 1;
}
it prints the values for the first iteration correctly and then for the
second iteration, it goes beyond 10 columns and prints it outside the columns.

Is there a way I can reset the <TD> to start from the beginning of the row
every time in the loop?
Please help...I am stuck with this for a while now.. need to solve it soon..
thanks,