Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

smarty foreach

{*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}
Source by www.smarty.net #
 
PREVIOUS NEXT
Tagged: #smarty #foreach
ADD COMMENT
Topic
Name
1+9 =