Answers for "smarty foreach"

PHP
0

smarty foreach

{foreach from=$myArray item=foo}
    <li>{$foo}</li>
{/foreach}

OR

{foreach $aZoneRecord as $aZoneRecordKey => $aZoneRecordVal}{/foreach}
Posted by: Guest on August-06-2020
0

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}
Posted by: Guest on April-09-2020

Browse Popular Code Answers by Language