【问题标题】:How to display list of high scores on a game in two tables?如何在两个表中显示游戏的高分列表?
【发布时间】:2011-09-17 05:17:14
【问题描述】:

我想在高分列表中显示前十名球员的名单,在数据库的表格中,我希望它的格式为 div 元素的一半应该显示前 5 名球员和另一半球员排名 6 -10.目前我的代码如下所示,任何人都可以帮助我......

echo('<table id="pattern-style-a" summary="Meeting Results">');
echo('<thead><tr><th scope="col">Profile</th><th scope="col">Score</th></tr>
    </thead><tbody>');
while ($row = mysql_fetch_assoc($result)) {
$count++;
?>    
<tr><td><?=image($row['user_id']);?><br /><a href="<?=$row['link']?>" target="_blank"><?=$row['name']?></a></td><td><?=$row['result']?></td></tr>
<?  
} 
?>
</tbody>
</table>

【问题讨论】:

    标签: php html html-table


    【解决方案1】:

    您可以尝试像这样构建表格:

    <table>
    <tr><td>
    
        <table [1-5]>
    
    
    </td><td>
    
        <table [6-10]>
    
    </td></tr>
    </table>
    

    【讨论】:

      猜你喜欢
      • 2011-11-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多