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

probléme avec une boucle

 
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
-abL^
Smarty n00b


Joined: 24 Jun 2005
Posts: 1

PostPosted: Fri Jun 24, 2005 5:40 pm    Post subject: probléme avec une boucle Reply with quote

Salut a tous alors je viens de commencer smarty ce matin bon j'arrive a me debrouiller mais j'arrive pas a faire un boucle je m'explique dans le fichier index.php je recupere des donnée de ma BDD donc je fais
$retour = mysql_query('la_requete');
while($donnees = mysql_fetch_array($retour))
{
$smarty->assign("theme",$donnees['nom']);
}
Donc la requete marche mais je ne sais pas comment faire une boucle (pour afficher les differents theme dans une liste déroulante) donc si quelqu'un sait comment faire . ca serait cool
++
merdi d'avance
Back to top
View user's profile Send private message Visit poster's website
bonvga
Smarty Rookie


Joined: 17 Mar 2005
Posts: 6

PostPosted: Tue Jul 19, 2005 9:58 pm    Post subject: Reply with quote

Hello,

Tu as 2 solutions :
- utiliser une section : http://smarty.php.net/manual/fr/language.function.section.php
- ou utiliser une boucle foreach : http://smarty.php.net/manual/fr/language.function.foreach.php
Back to top
View user's profile Send private message Visit poster's website
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