エンジニア的な技術的なブログ

webエンジニアの開発の知見を書きます。PHP、javascript、postgres、mysql、あと多少のインフラ周りとか。

2014-01-14から1日間の記事一覧

smartyのsectionとかloopの回数取得なら!

{section name=counter loop=$array_data start=2 step=2 max=10} {if $smarty.section.counter.first} {* 最初のループ時にtrueになります *} 最初のデータ {/if} {if $smarty.section.counter.last} {* 最後のループ時にtrueになります *} 最後のデータ {/…