Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
Construction dynamique d'un index d'un tableau associatif

 
Post new topic   Reply to topic    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:   
Post new topic   Reply to topic    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