Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我是初学者,我试图在 smarty php 中编写一些嵌套的 if-else 语句。它无法识别它们并给出错误。我已经发布了我的代码片段,但最好有人给我一个例子。谢谢 :D
{if $my_value[1]==1} {if}{/if} ======>here I get the error {elseif $my_value[1]==2} {else} {/if}
尝试这个:
{if $my_value[1] == 1} 1 {elseif $my_value[1] == 2} 2 {else} 0 {/if}