我需要你的帮助。我怎么能把两张桌子排成一行,因为第二张桌子在第一张桌子下面,我不明白如何把它们放在一起。
我的代码:
<html>
<head>
</head>
<body>
<h3>Tests</h3>
<div style="display: inline;">
<table border="3">
<tr>
<th>
<?php
$con = mysql_connect("localhost","root","sergios.com");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("phptests", $con);
$result1 = mysql_query("SELECT * FROM question");
for($i=1;$i<93;++$i)
{
$result = mysql_query("SELECT * FROM Category");
echo "Number:".$i."<br />";
echo "<select>";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo "<option>" . $line['name'] . "</option>";
}
echo "</select>";
?>
<canvas id="myCanvas" width="20" height="20" style="border:1px solid #c3c3c3;">
</canvas>
<?php
}
?>
</table>
<table border="2">
<tr>
<th>
<?php
for($i=1;$i<92;++$i)
{
$result2 = mysql_query("SELECT * FROM question");
echo "<select>";
while($row1 = mysql_fetch_array($result2))
{
echo "<option>" . $row1['number'] . "</option>";
}
echo "</select>";
echo "<hr />";
}
mysql_close($con);
?>
</tr>
</table>
</div>
</body>
</html>