我想知道是否有人可以幫忙?我試圖在表格中輸出SQL,並且我想使用函數'slot'和'groupnum'來修改輸出的表示。當我嘗試下面的代碼時,結果會在表格上方以未格式化的方式打印出來,而不是打印出來。有沒有解決這個問題?如何使用函數來修改sql結果演示文稿?
// Table header.
echo '<table>
<tr><td><b>Time Slot</b></td>
<td><b>Group</b></td>
</tr>';
// Fetch and display the records:
while ($row9 = mysqli_fetch_array($result9, MYSQLI_ASSOC)) {
echo '<tr>
<td>' .slot ($row9['slotid']). '</td>
<td>' .groupnum($row9['groupid']). '</td>
</tr>';
}
echo '</table>'; // Close the table.
「table」元素在哪裏?如果你正在存儲,那麼你在這裏輸出是有道理的。附加值,不要回顯;或回聲一切... – chris85