【发布时间】:2016-07-28 11:52:49
【问题描述】:
我从数据库中检索数据并尝试在表中实现它们,但现在我不知道如何在表中排列它们。我的看法是:
<?php include('inc/header.php');?>
<div class="main">
<table>
<thead>
<tr>ID:</tr>
<th>Name:</th>
</thead>
<tbody>
<tr>
<?php foreach ($view as $row) :?>
<?php $i = 1;?>
<?php echo "<td>".$row->audio."</td>";?>
<?php echo $i++;?>
<?php endforeach;?>
</tr>
</tbody>
</table>
</div>
<?php include('inc/footer.php');?>
我只是想让place id从一个增加到尽可能多的记录并将它们排列到一个表中。
【问题讨论】:
标签: html codeigniter foreach html-table codeigniter-3