0
我想在每行的末尾顯示每行的總值...所有記錄都從數據庫中獲取,但如何計算每行的總數價值和如何在每一行的結尾顯示它?請幫忙。需要每行的總值,並應該顯示在行的末尾
<table class="rwd-table ui form" id="myTable">
<thead>
<tr>
<th width="50%">DATE</th>
<th>TARGET DAILY CONSUMPTION MMBTU</th>
<th>CONSUMPTION FROM 00H TO 12H IN MMSCF</th>
<th>CONSUMPTION FROM 12H TO 24H IN MMSCF</th>
<th>CONSUMPTION PER RAK GAS IN MMBTU</th>
<th>REASON OF VARIATION OF CONSUMPTION BETWEEN ACTUAL & TARGET</th>
</tr>
</thead>
<tbody>
<?php foreach ($view as $report) {?>
<tr style="color: #000000;">
<td><?php echo $report['date'];?></td>
<td><?php echo $report['Target Daily Consumption in MMBTU'];?></td>
<td><?php echo $report['Consumption From 00h to 12h in MMSCF'];?></td>
<td><?php echo $report['Consumption From 12h to 24h in MMSCF'];?></td>
<td><?php echo $report['Consumption As Per RAK Gas in MMBTU'];?></td>
<td><?php echo $report['Reason of Variation of Consumption Between ACTUAL & TARGET'];?></td>
</tr>
<?php }?>
</tbody>
</table>
實際結果是''裏面的內容,需要添加 – Samir
什麼是總價值在這裏以及如何得到它? – Kafo
你有所有的選擇打開,在'DOMConentLoaded'之後使用'PHP'或使用'JavaScript'來使用 – Rayon