search

Home  >  Q&A  >  body text

Ternary comparison fails in thinkphp 5.1 template

<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>
    

凡人凡人1911 days ago1254

reply all(1)I'll reply

  • 殘留の回憶

    殘留の回憶2019-12-05 18:53:07

    Chinese {, you should have changed the template tag

    reply
    0
  • Cancelreply