1 回答

TA貢獻(xiàn)1887條經(jīng)驗(yàn) 獲得超5個(gè)贊
您需要將</table>-Tag 放在 foreach 循環(huán)之外:
echo "<table>";
foreach ($grabdata as $row) {
echo "<tr>";
echo "<td class='editableColumns'>" . $row['EmployeeName'] . "</td>";
echo "<td class='editableColumns'>" . $row['EmployeeID'] . "</td>";
echo "<td class='editableColumns'>" . $row['ContactNumber'] . "</td>";
echo "<td class='editableColumns'>" . $row['Gender'] . "</td>";
echo "<td class='editableColumns'>" . $row['Email'] . "</td>";
echo "<td class='editableColumns'>" . $row['DOB'] . "</td>";
echo "<td class='editableColumns'>" . $row['AreaOfExpertise'] . "</td>";
echo "<td class='editableColumns'>" . $row['State'] . "</td>";
echo "<td class='editableColumns'>" . $row['Status'] . "</td>";
echo "<td><input class='editValues' type='button' value='Edit'></td>";
echo "</tr>";
}
echo "</table>";
- 1 回答
- 0 關(guān)注
- 119 瀏覽
添加回答
舉報(bào)