Skip to the content
Documentation

Additional parameters

No ratings yet

To use <b>max</b>:
{* Loop through only the first two elements of $array *}
{foreach $array as $array_item max 2}
{$array_item.name}
{/foreach}
To use <b>offset</b>:
{* Loop through the elements of $array, starting with the third element *}
{* Assumes $array is zero-based *}
{foreach $array as $array_item offset 2}
{$array_item.name}
{/foreach}