{foreach key=tid item=cat from=$list} <div class="parent"> <div class="child">...</div> </div> {/foreach}