|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
benjiiim Guest
|
Posted: Fri Oct 06, 2006 12:42 pm Post subject: Construction dynamique d'un index d'un tableau associatif |
|
|
Bonjour,
Voici le bout de code incrimine :
Code: |
<!--[section name=customer loop=$field_names]-->
<p>
<!--[$field_names[customer]]--> :
<!--[foreach from=$rows item=row]-->
<!--[$row.$field_names[customer]]-->
<!--[/foreach]-->
<br />
</p>
<!--[/section]-->
|
Comme indique dans le sujet, je souhaite construire dynamiquement le nom d'un champ d'un tableau associatif. Malheureusement, ma solution ne semble pas fonctionner...
Au pire, je peux me contenter d'aller chercher le champ souhaite grace a son numero (<!--[$row[$smarty.section.customer.rownum]]-->) mais cela ne semble pas fonctionner avec un tableau associatif...
Comment puis-je faire ?
Merci de votre aide
++
Ben le debutant... |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|