这是我的代码:
echo "<table><tr>";
$count = 1;
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
extract($row);
$data = $row['info'];
echo "<td>".$data."</td>";
if ($count++ % 2 == 0) {
echo "</tr><tr>";
}
}
echo "</tr></table>";
上面的代码工作如下:
=========
= 1 = 2 =
= 3 = 4 =
= 5 = 6 =
=========
但是如何以这种格式显示信息?
=========
= 1 = 4 =
= 2 = 5 =
= 3 = 6 =
=========