I have the following...
<td>$columns[0]</td>
<td>$columns[1]</td>
and so on, followed by
<td>%s</td>
<td>%s</td>
and so on, followed by
$myrow["$columns[0]"],
$myrow["$columns[1]"],
Its displaying results in a table format from a mysql db...
The top number required is kept in a variable, $nf, now currently the lists I have go up to 35, so even if it only needs to be 3, my table has 35 columns...
Can someone tell me how to sort this and to use a while loop like below...
$list = 0;
while ($list < $nf) {
//display whatever up to $nf
}
to display only the number of results I want,
ie if $nf = 1, only the pieces of code are required, if its 2, then
<td>$columns[2]</td>
<td>%s</td>
$myrow["$columns[2]"],
are added on.
I hope that makes sense, please, can anyone help me!
Thanks