foreach smarty

92

{*Array of items*}
{foreach from=$myArray item=foo}
    <li>{$foo}</li>
{/foreach}

{*Key value array*}
{foreach from=$myArray key=k item=v}
   <li>{$k}: {$v}</li>
{/foreach}

Comments

Submit
0 Comments