ThinkPHP-如何在option中使用if语句

<select name="area">
<volist name="area" id="l">
<option value="{$l.id}" <if condition="$vo.areaid eq $l['id']">selected</if>>{$l.title}</option>
</volist>
</select>

注意写法: 在if中,{$l.id} 要写成 $l[‘id’]

affiliate_link
Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

Comments are closed.