{do} [ {delimiter}...{/delimiter} ] [ {break} ] [ {continue} ] [ {skip} ] {/do while <condition> [ sequence <array> as $seqVar ]}
This mechanism is very similar to the "while" construct, except that the expression is checked at the end of each iteration instead of in the beginning. The main difference is that this construct will always execute the first iteration (regardless of how the test expression evaluates). It supports breaking, continual and skipping.
{do} Keep printing this line ({$counter}) <br /> {set $counter=inc( $counter )} {/do while ne( $counter, 8 )}
If the initial value of $counter is 0, the following output will be produced:
Keep printing this line (0)
Keep printing this line (1)
Keep printing this line (2)
Keep printing this line (3)
Keep printing this line (4)
Keep printing this line (5)
Keep printing this line (6)
Keep printing this line (7)
Keep printing this line (8)