我有一张像
id course activities
1 Microbiology Quiz1
2 Microbiology Quiz2
3 Microbiology Quiz3
4 Microbiology Quiz4
我需要在 php 文件中显示为表头
Quiz1 Quiz2 Quiz3 Quiz3 Quiz4
这是我的代码
<?php
$sql = mysql_query('SELECT * FROM activity');
while($row = mysql_fetch($sql))
{
$activities $row['activities'];
}
echo '<table>
<tr>
<th>'.$activities.'</th>
</tr>
</table>';
?>