HTML表未回显

问题描述 投票:0回答:2

我从5小时起尝试这样做,不知道我做错了。我的表回显结果,但不回显总计。

    <table width="102%" border="0">
    <tr>


      <th><b>Amount</b></th>
      <th ><strong>County</strong></th>

      </tr><?php

      (this fetches data ...$row = mysqli_fetch_array($res) or die(mysqli_error($db)))
echo "<tr>";
    echo "<td>" . $price . "</td>";
echo "<td>" . $rui['county'] . "</td>";
echo "</tr>";
(I get these entreis correct )
}
  }
(Below table is not echoed)
echo "<tr>";
echo "<td> .<b>Total </b>. </td>";  
echo "<td>" .$x. "</td>";
echo "<td></td>";
echo "</tr>";
?></table>
php echo
2个回答
0
投票
<table width="102%" border="0"> <tr> <th><b>Amount</b></th> <th ><strong>County</strong></th> </tr> <?php (this fetches data ...$row = mysqli_fetch_array($res) or die(mysqli_error($db))) echo "<tr>"; echo "<td>" . $price . "</td>"; echo "<td>" . $rui['county'] . "</td>"; echo "</tr>"; (I get these entreis correct ) (Below table is not echoed) echo "<tr>"; echo "<td> .<b>Total </b>. </td>"; echo "<td>" .$x. "</td>"; echo "<td></td>"; echo "</tr>"; } ?> </table>

0
投票
<table width="102%" border="0"> <tr> <th><b>Amount</b></th> <th ><strong>County</strong></th> </tr><?php //(this fetches data ...$row = mysqli_fetch_array($res) or die(mysqli_error($db))) echo "<tr>"; echo "<td>" . $price . "</td>"; echo "<td>" . $rui['county'] . "</td>"; echo "</tr>"; //(I get these entreis correct ) //(Below table is not echoed) echo "<tr>"; echo "<td> .<b>Total </b>. </td>"; echo "<td>" .$x. "</td>"; echo "<td></td>"; echo "</tr>"; ?> </table>
© www.soinside.com 2019 - 2024. All rights reserved.