0
我有一个简单的问题。我需要在smarty中追加1,2,3等变量名。变量是$user1
,$user2
,$user3
等我用智者做一个简单的循环是这样的:将变量名追加数字并在循环中调用它(php)(smarty)
{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}
我试图在variable info site to smarty一切。