|
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 |
malinois59 Smarty n00b
Joined: 15 Dec 2013 Posts: 2
|
Posted: Sun Dec 15, 2013 10:59 pm Post subject: Probleme de section un while php avec deux variable à l'int |
|
|
Voila mon soucis j'ai une iteration avec while en php , j'arrive a recuperer une variable mais pas la deuxieme
sa c'est le php
<?
$nbpages=ceil($total/$Liste_Nb);
$numeroPages = 1;
$compteurPages = 1;
$limitepage = 0;
while($numeroPages <= $nbpages) {
$numeroPages = $numeroPages + 1;
$limitepage=$limitepage+$Liste_Nb;
$compteurPages = $compteurPages + 1;
if($compteurPages == 10) {
$compteurPages = 1;
}
}
$smarty->assign('numeroPages', $numeroPages);
$smarty->assign('limitepage', $limitepage);
?>
Voila mon template ou j'arrive a recuperer la variable $numeroPage , mais pas moyen de recuperer $limitepage
{section name=numeroPages loop=$numeroPages}
<td align=left>
<A href="{$smarty.server.PHP_SELF}index.php?page=1page&lang={$smarty.request.lang}&dep=
{$je veux afficher cette variable de la boucle.limitepage}&wilaya={$wilaya}&categorie={$categorie} ">*}
{$smarty.section.numeroPages.iteration}
</A>
</td>
{/section}
je n'arrive pas a recuperer la $limitepage merci |
|
Back to top |
|
malinois59 Smarty n00b
Joined: 15 Dec 2013 Posts: 2
|
Posted: Sun Feb 23, 2014 11:57 am Post subject: Please help me |
|
|
Voila mon soucis j'ai une iteration avec while en php , j'arrive a recuperer une variable mais pas la deuxieme
sa c'est le php
<?
$nbpages=ceil($total/$Liste_Nb);
$numeroPages = 1;
$compteurPages = 1;
$limitepage = 0;
while($numeroPages <= $nbpages) {
$numeroPages = $numeroPages + 1;
$limitepage=$limitepage+$Liste_Nb;
$compteurPages = $compteurPages + 1;
if($compteurPages == 10) {
$compteurPages = 1;
}
}
$smarty->assign('numeroPages', $numeroPages);
$smarty->assign('limitepage', $limitepage); // je n'arrive a recuperer cette variable dans mon template ??????
?>
Voila mon template ou j'arrive a recuperer la variable $numeroPage , mais pas moyen de recuperer $limitepage ?????????????????
{section name=numeroPages loop=$numeroPages}
<td align=left>
<A href="{$smarty.server.PHP_SELF}index.php?page=1page&lang={$smarty.request.lang}&dep=
{$limitepage}&wilaya={$wilaya}&categorie={$categorie} ">*}
{$smarty.section.numeroPages.iteration}
</A>
</td>
{/section}
je n'arrive pas a recuperer la $limitepage merci |
|
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
|