|
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 |
1695 Smarty Rookie
Joined: 17 Jun 2008 Posts: 6
|
Posted: Tue Sep 20, 2011 3:07 pm Post subject: Boucle for avec 2 conditions |
|
|
Hi,
J'ai besoin d'aide pour "convertir" du code PHP dans la syntaxte smarty.
Voici le code PHP :
Code: |
for($i = 1; $i <= count($calendar); $i++){
echo('<tr>');
for($j = 1; $j <= 7 && $j-$monthInfos['firstday']+1+(($i*7)-7) <= $monthInfos['nbdays']; $j++){
// du code
}
echo('</tr>');
}
|
Le premier "for" est facile à "convertir". Mais comme le second a deux conditions, je ne sais pas le mettre en syntaxe smarty.
[code]
{section name="ROW" loop=$COUNT_CAL start=1}
<tr>
{section ???}
{/section}
</tr>
{/section}
Merci d'avance. |
|
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
|