我从我的服务器获取数据并希望它们显示如下:
相反,会发生这种情况:
我使用 PHP 作为值:
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
Player Name
</td>
<td >
PK Level
</td>
<td>
Kills
</td>
<td>
Experience
</td>
</tr>
<tr>
<td >
<?php
$result = mysql_query("SELECT * FROM high ORDER BY Runecraftlvl DESC LIMIT 20");
while($row = mysql_fetch_array($result))
{
echo $row['Runecraftlvl'];
echo "<br />";
}
?>
</td>
<td>
<?php
$result = mysql_query("SELECT * FROM high ORDER BY Runecraftlvl DESC LIMIT 20");
while($row = mysql_fetch_array($result))
{
echo $row['Runecraftlvl'];
echo "<br />";
}
?>
</td>
<td>
<?php
$result = mysql_query("SELECT * FROM high ORDER BY Runecraftlvl DESC LIMIT 20");
while($row = mysql_fetch_array($result))
{
echo $row['Runecraftlvl'];
echo "<br />";
}
?>
</td>
<td>
<?php
$result = mysql_query("SELECT * FROM high ORDER BY Runecraftlvl DESC LIMIT 20");
while($row = mysql_fetch_array($result))
{
echo $row['Runecraftlvl'];
echo "<br />";
}
?>
</td>
</tr>
</table>
为什么会这样?我怎样才能让数据放在单独的行上,每行 4 个数据?