0
我有一个for循环插入数据到我的表,运作良好。停止循环重复表
问题是每个循环我希望它开始一个新的行,但它启动一个新的表。任何想法如何解决这一问题?
<?php if (isset($records)) : foreach ($records as $row) : ?>
<div id="mobile-content">
<table class="table table-hover">
<thead>
<tr>
<th>Account Name</th>
<th>Balance</th>
<th>Start Date</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $row->bank_name; ?></td>
</tr>
<tr>
<td><?php echo $row->bank_balance; ?></td>
</tr>
<tr>
<td><?php echo $row->bank_start_date; ?></td>
</tr>
</tbody>
</table>
</div>
<?php endforeach; ?>
谢谢,看起来没错。虐待我的代码尝试。当它生病时接受你的答案。谢谢 – Beep