RE: [SMARTY] another section problem

From: Date: Sun, 16 Mar 2003 15:00:41 +0000
Subject: RE: [SMARTY] another section problem
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8676@lists.php.net to get a copy of this message
> {section name=item loop=$front} > ID : $front[item].newsID <br /> > subject : $front[item].newsSubject <br /> > content : $front[item].newsContent <br /> > Img : $front[item].newsImg <br /> > {/section} Your PHP variable $news is mapped into the Smarty variable named item, so that's what you need to be looping through: {section name=x loop=$item} ID : $item[x].newsID <br /> subject : $item[x].newsSubject <br /> content : $item[x].newsContent <br /> Img : $item[x].newsImg <br /> {/section} Obviously in this context, it might make more sense to use a different Smartry variable name other than "item", but that's your call! Scott

« previous php.smarty.general (#8676) next »