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 模板引擎的新手,我被困在这一点上。实际上,我想在 Smarty 模板的下拉列表中添加 1 到 31 个数字。下面是我的代码:
<select name="date"> {for $f = 1 to 31} <option value="{$foo}">{$foo}</option> {/for} </select>
但它给出了一个错误。你能帮我解决这个问题吗?提前致谢。
{section name=waistsizes start=28 loop=40 step=1} <option value="{$smarty.section.waistsizes.index}"> $smarty.section.waistsizes.index} </option> {/section}