Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Construction dynamique d'un index d'un tableau associatif

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: French
View previous topic :: View next topic  
Author Message
benjiiim
Guest





PostPosted: Fri Oct 06, 2006 12:42 pm    Post subject: Construction dynamique d'un index d'un tableau associatif Reply with quote

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
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: French All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP