Smarty 模板的 if 判断和 foreach 循环
PHP 圈<?php
<{if !empty($ad)}>
<div class="right-item spaces">
<ul class="item-list clearfix">
<{foreach from=$ad key=k item=v}>
<li>
<a href="<{$v['url']}>" title="<{$v['name']}>" rel="nofollow" >
<img src="<{$v['img']}>" width="270" height="120" alt="<{$v['name']}>">
</a>
</li>
<{/foreach}>
</ul>
</div>
<{/if}>
?>
共 0 条评论