Sup guys.
Okay, straight to the point: I'm trying to perform a while loop with some data from my database and it's working fine appart from the way the data is displayed. I need the data to be displayed in a different "<td>" as in the ID would be different, so that the structure of the table would look like this:
______________
| TD 1 - Data 1 |
| TD 2 - Data 2 |
| TD 1 - Data 3 |
| TD 2 - Data 4 |
| TD 1 - Data 5 |
¬¬¬¬¬¬¬¬¬¬¬
If that makes any sense to anyone lol. I'm quite new to PHP and Mysql, but am okay with HTML and CSS, so if my PHP terms are wrong forgive me. My code for the table so far is as follows:
Quote:
<table id="navigation" title="Navigation" border="0" width="190" align="right" cellspacing="0">
<td rowspan="16" id="general_Sidebar" align="right">Hi</td>
<td id="general_Grey_Header" class="general_Grey_Header">Newest Users<br></td>
</tr>
<?
$dbres = mysql_query("SELECT `signup`,`login` FROM `users` WHERE `level`!='-1' AND `level`!='0' AND `game_id`='1' ORDER BY `signup` DESC LIMIT 10");
while($user = mysql_fetch_assoc($dbres)){
?>
<tr><td id="general_Light_Grey" class="general_Light_Grey"><b><?php echo($user[login]); ?></b></td>
</tr>
<tr><td id="general_Grey" class="general_Grey"><b><?php echo($user[login]); ?></b></td>
</tr>
<?
}
?>
</table>
This is for a Newest User feature that displays the last ten usernames that signed up. So far I can either make it display each username twice but have the right layout, or disply each name once and have to wrong layout. I need it to display the right layout and display each username only once. If that also makes any sense lol.
If more info is required just ask, thanks for your time and help :D