smarty中for循环
<table>
<tr>
<td align="right">生 日:</td>
<td>
<select name="year">
<option value="">请选择年</option>
{{assign var=i value=1900}}
{{section name=total loop=114}}
{{assign var=i value=$i+1}}
<option value="{{$i}}" {{if $birthyear==$i}}selected{{/if}}>{{$i}}</option>
{{/section}}
</select>
<select name="month">
<option value="">请选择月</option>
{{assign var=i value=0}}
{{section name=total loop=12}}
{{assign var=i value=$i+1}}
<option value="{{$i}}" {{if $birthmonth==$i}}selected{{/if}}>{{$i}}</option>
{{/section}}
</select>
<select name="day">
<option value="">请选择日</option>
{{assign var=i value=0}}
{{section name=total loop=31}}
{{assign var=i value=$i+1}}
<option value="{{$i}}" {{if $birthday==$i}}selected{{/if}}>{{$i}}</option>
{{/section}}
</select>
</td>
</tr>
</table>