So vielleicht?
PHP-Code:
<?
$platz = db_query("SELECT t1.uid, t1.punkte, t2.nickname FROM ".$db_prefix."_tbettelrally AS t1 LEFT JOIN ".$db_prefix."_userdaten AS t2 ON t2.uid = t1.uid WHERE t1.punkte > '".$ralleydaten['minimum']."' ORDER BY t1.punkte DESC LIMIT 20");
while ($pa = mysql_fetch_array($platz)) {
$rp++;
if ($ralleydaten['art'] == 'statisch') {
$mg = number_format($ralleydaten['p'.$rp],2,",",".");
} else {
$mg = number_format($ralleydaten['jackpot'] / 100 * $ralleydaten['p'.$rp],2,",",".");
}
if ($rp > $ralleydaten['plaetze']) $mg = '----';
echo '
<tr bgcolor="#FAE5C4">
<td align="center">'.$rp.'. </td>
<td align="center">'.$pa['uid'].'</td>
<td align="center">'.$pa['nickname'].'</td>
<td align="center">'.number_format($pa['punkte'],0,",",".").'</td>
<td align="center">'.$mg.'</td>
</tr>
';
}
for($x=$rp+1;$x<21;$x++){
if ($ralleydaten['art'] == 'statisch') {
$mg = number_format($ralleydaten['p'.$x],2,",",".");
} else {
$mg = number_format($ralleydaten['jackpot'] / 100 * $ralleydaten['p'.$x],2,",",".");
}
if ($x > $ralleydaten['plaetze']) $mg = '----';
echo '
<tr bgcolor="#FAE5C4">
<td align="center">'.$x.'. </td>
<td align="center">N/A</td>
<td align="center">N/A</td>
<td align="center">0</td>
<td align="center">'.$mg.'</td>
</tr>
';
}
?>