Hi. I have a simple question. I need to append 1,2,3 etc to a variable name in smarty. The variables are $user1
, $user2
, $user3
etc. I use smarty to do a simple loop like this:
{section name=user_info start=1 loop=$users}
<tr>
<td> User{$smarty.section.user_info.index} </td> // prints user1, user2, user3 etc
<td>
{$user} append this: {$smarty.section.user_info.index} // need to call $userX
</td>
</tr>
{/section}
I tried everything on the variable info site to smarty.