PROGRAMMING/PHP

smarty 예 foreach

OJR 2009. 10. 23. 11:12

{foreach from=$comments item=oComment name=commentlist}
   <li id="postComment_{$oComment.seq}" class="commentItem{if !$smarty.foreach.commentlist.last} dot01{/if}">
    {math equation="iteration + (2 * (page-1))" iteration=$smarty.foreach.commentlist.iteration page=$page assign=rank}
{/foreach}