Taylor_1978
07-12-2005, 12:01 AM
Hey,
Here's the code:
$select = mysql_query("SELECT
rank,
alias,
rating,
matchesplayed,
matcheswon,
matcheslost,
percentage,
money,
id
FROM users ORDER BY alias");
while ($uinfo = mysql_fetch_array($select)) {
$plist.= '<tr>';
foreach($uinfo as $info) {
$plist.= ' <td class="boxcontent" align="center">'.$info.'</td>';
}
$plist.= '</tr>';
}
print '<table width="95%" cellpadding="3" cellspacing="1" bgcolor="black">';
print ' <tr>';
print ' <td class="boxtitle" align="center">Rank</td>';
print ' <td class="boxtitle" align="center">Alias</td>';
print ' <td class="boxtitle" align="center">Rating</td>';
print ' <td class="boxtitle" align="center">Played</td>';
print ' <td class="boxtitle" align="center">Won</td>';
print ' <td class="boxtitle" align="center">Lost</td>';
print ' <td class="boxtitle" align="center">%</td>';
print ' <td class="boxtitle" align="center">'.$linfo[money].'</td>';
print ' <td class="boxtitle" align="center">ID #</td>';
print ' </tr>';
print $plist;
print '</table>';
For some reason.. it is showing each of the TDs twice.
EG.
Instead of one row being say:
1 Taylor 4 1500
I'm getting:
1 1 Taylor Taylor 4 4 1500 1500
It kind of has me stumped as to why???
Thanks in advance for any help :thumbsup:
Here's the code:
$select = mysql_query("SELECT
rank,
alias,
rating,
matchesplayed,
matcheswon,
matcheslost,
percentage,
money,
id
FROM users ORDER BY alias");
while ($uinfo = mysql_fetch_array($select)) {
$plist.= '<tr>';
foreach($uinfo as $info) {
$plist.= ' <td class="boxcontent" align="center">'.$info.'</td>';
}
$plist.= '</tr>';
}
print '<table width="95%" cellpadding="3" cellspacing="1" bgcolor="black">';
print ' <tr>';
print ' <td class="boxtitle" align="center">Rank</td>';
print ' <td class="boxtitle" align="center">Alias</td>';
print ' <td class="boxtitle" align="center">Rating</td>';
print ' <td class="boxtitle" align="center">Played</td>';
print ' <td class="boxtitle" align="center">Won</td>';
print ' <td class="boxtitle" align="center">Lost</td>';
print ' <td class="boxtitle" align="center">%</td>';
print ' <td class="boxtitle" align="center">'.$linfo[money].'</td>';
print ' <td class="boxtitle" align="center">ID #</td>';
print ' </tr>';
print $plist;
print '</table>';
For some reason.. it is showing each of the TDs twice.
EG.
Instead of one row being say:
1 Taylor 4 1500
I'm getting:
1 1 Taylor Taylor 4 4 1500 1500
It kind of has me stumped as to why???
Thanks in advance for any help :thumbsup: