Re: [SMARTY] Smarty, PEAR, Associative Array and Loops

From: Date: Wed, 06 Apr 2005 08:10:48 +0000
Subject: Re: [SMARTY] Smarty, PEAR, Associative Array and Loops
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12415@lists.php.net to get a copy of this message
Reynier Pérez Mira wrote:
while($row = $evenres->fetchRow()){
        array_push($titulo,$row[1]);
        array_push($descripcion,$row[2]);
        array_push($contenido,$row[3]);
        $template->assign("titArr",$titulo);
        $template->assign("descArr",$contenido);
        $template->assign("conArr",$descripcion);
}
Assign the arrays to smarty after the loop, now you assign the array to smarty in every iteration. --- -=:[ Panu ]:=- Make your life easier: http://www.mozilla.org/products/thunderbird/ http://www.xs4all.nl/~hanb/documents/quotingguide.html http://home.in.tum.de/~jain/software/oe-quotefix/

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