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.
renseigner une liste select à partir d'une source XML

 
Post new topic   Reply to topic    Smarty Forum Index -> Language: French
View previous topic :: View next topic  
Author Message
kaas
Smarty Rookie


Joined: 05 Feb 2009
Posts: 13

PostPosted: Wed May 20, 2009 8:06 am    Post subject: renseigner une liste select à partir d'une source XML Reply with quote

Bonjour,

J'ai un souci qui est celui de renseigner une liste select à partir d'une source XML.
Voilà ce que je fais sans succès. s'il vous plait dites moi si cela a un sens ou pas :

Code:

<td colspan="3" >
               {foreach from=$smarty_xml_file item=ressource}
               <select  id="ressource" name="ressource" />
                     </option value=""></option>
                     {html_options values=$smarty_xml_file output=$ressource->nomtable}
               </select>
               {/foreach}
</td>
Back to top
View user's profile Send private message
kaas
Smarty Rookie


Joined: 05 Feb 2009
Posts: 13

PostPosted: Fri May 22, 2009 8:56 am    Post subject: Reply with quote

j'ai trouvé une solution et c'est celle là :


Code:


td colspan="3" >
               
<select  id="ressource" name="ressource" >
         {foreach from=$smarty_xml_file item=ressource}<option>{$ressource->table}</option>{/foreach}               
</select>
</td>


Back to top
View user's profile Send private message
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