how to get last 7 element of php array in smarty ? I wrote code to get last element
{foreach from=$results item=result name=forsmart}
{if $smarty.foreach.forsmart.last}
{$result->getAvgtimeonpage()|date_format:"%M :%S"}
{/if}
{/foreach}
how to get last 7 elements ?
Best Regards, thanks for help