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

Probleme de section un while php avec deux variable à l'int

 
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
malinois59
Smarty n00b


Joined: 15 Dec 2013
Posts: 2

PostPosted: Sun Dec 15, 2013 10:59 pm    Post subject: Probleme de section un while php avec deux variable à l'int Reply with quote

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
View user's profile Send private message
malinois59
Smarty n00b


Joined: 15 Dec 2013
Posts: 2

PostPosted: Sun Feb 23, 2014 11:57 am    Post subject: Please help me Reply with quote

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