I have an array:
$team_details = Array ( [id] => 1 [name] => doge_finder [total_rewards] => 52.00524500 [desciption] => team is only of doge miners [created_by] => 20 );
/* assigning to a smarty template */
$smarty->assign("team_record", $team_details);
$smarty->display($tpl);
{foreach from= $team_record key=team item=trecord}
{$trecord[$key].name}
{/foreach}
You dont have to user {foreach}
if you just want to print one associative array. Just use $array.key
format.
In this case, you should print using
{$team_record.name}
If you have multiple associative array. You can use:
{foreach from=$team_record key=team item=record}
{$record.name}
{/foreach}