php文件中
$sql=mysql_query("select * from kehu_information where special is not null");
while($row=mysql_fetch_assoc($sql)){
$table[]=$row;
}
$smarty->assign('table',$table);
$smarty->display('Smarty/templates/kehu.html');
html文件中
<table class="table table-hover">
<thead>
<tr>
<th>客户</th>
<th>预算</th>
<th>缴费</th>
<th>缴费方式</th>
</tr>
</thead>
<tbody>
<{foreach from=$table item=i}>
<tr>
<td><{$i.kehu}></td><td><{$i.yusuan}></td><td><{$i.jiaofei}></td><td><{$i.jiaofei_style}></td>
</tr>
<{/foreach}>
</tbody>
</table>