<select name="tra_num">
<option value="" {$num_tra=="%"?'selected':''}>全部</option>
{volist name="list_tra" id="arr_tra" empty="没有文章"}
<option value="{$arr_tra.id}" { {$num_tra} == {$arr_tra.id} ?'selected':''}>{$arr_tra.id}</option>
{/volist}
</select>
这样写双花括号无效 从调试程序中看是以下状况
<select name="tra_num">
<option value="" >全部</option>
<option value="1" { (7 == 1 ?'selected':'')}>1</option>
<option value="2" { (7 == 2 ?'selected':'')}>2</option>
<option value="4" { (7 == 4 ?'selected':'')}>4</option>
<option value="5" { (7 == 5 ?'selected':'')}>5</option>
<option value="6" { (7 == 6 ?'selected':'')}>6</option>
<option value="7" { (7 == 7 ?'selected':'')}>7</option>
</select>
</div>
中文的{吧,还是你改了模板标签了