我目前正在从 Oracle 表中循环 SQL 结果。表中的所有行都返回正常,但它们都留在元素内而不是像下面这样的新行
这是我现在的表...
<div id="smtTable" class="targetDiv">
<table width="40%" style="margin: 0 auto; border:1px solid;text-align:center; width: auto;" class="table table-sm table-dark">
<tr>
<th scope="col">Area</th>
<th scope="col">Week 18</th>
<th scope="col">Week 19</th>
<th scope="col">Week 20</th>
<th scope="col">Week 21</th>
<th scope="col">Week 22</th>
</tr>
<?php
while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) {
foreach ($row as $item) {
echo " <td>" . ($item !== null ? htmlentities($item, ENT_QUOTES) : " ") . "</td>\n";
}
}
?>
芜湖不芜