Re: [SMARTY] form : dynamically naming form elements
| From: | Luc Saint-Elie | Date: | Tue, 03 Jun 2003 07:15:14 +0000 |
| Subject: | Re: [SMARTY] form : dynamically naming form elements | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9641@lists.php.net to get a copy of this message | ||
Hello,
The relation with Smarty is that I use Smarty not raw PHP :-).
I'm not sure anybody in php-genral knows that accessing smarty based arrays is done by $smarty.section.sectionname.index
I found the solution in the wiki
{section name=masec loop=$listeclients}
<tr>
<td>
<input type="text"
name="nom{$smarty.section.masec.index}"
id="nom{$smarty.section.masec.index}"
value="{$listeclients[masec].0}"
size="20" />
Luc
At 09:00 03/06/2003 +0200, messju mohr wrote:
i think using 3 arrays would be best for sth. like that: see http://www.php.net/manual/en/faq.html.php#faq.html.arrays on how to do it. i'm missing the relation to smarty, though. use php-general for stuff like this. greetings messju