Re: Put MySql data formatted in a HTML table
| From: | Rasmus Lerdorf | Date: | Tue, 09 Jan 2001 08:02:46 +0000 |
| Subject: | Re: Put MySql data formatted in a HTML table | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33417@lists.php.net to get a copy of this message | ||
> while ($i != $aantal_gevonden){
> echo "<TR>
> <TD><a
> href='index.php?actie=lyncers&uid=$uid[x]'>$uid[x]</a></td>";
> // Increase the counters
> $x++;
> $i++;
> echo " <TD><a
> href='index.php?actie=lyncers&uid=$uid[y]'>$uid[y]</a></td>
> </TR>";
> $y++;
> $i++;
> }
I'd change that while() loop to:
while($i < $aantal_gevonden)
Since you are incrementing $i twice inside the loop and it start at 0 then
$i is only ever hitting even numbers. If $aantal_genvonden is an odd
number the loop will never end.
-Rasmus