夕口技術錄
專業上的小常識,備而用之~
Monthly Archives: 十一月 2009
[Smarty] – how to use 『break or continue』 ?
2009/11/06
Posted by 於 Smarty 樣版引擎,
如何在 section 迴圈要使用如 PHP 中所使用的 break 或 continue 呢 ?
方法還是得利用 Smarty 中 PHP 方法…
{section name=loop loop=$record}
{if $record[loop].id == “xx"}
{php}break;{/php}
{php}continue;{/php}
{/if}
{/section}
近期迴響