Re: Réf. : [SMARTY] Section Problem

From: Date: Thu, 16 Jan 2003 14:03:05 +0000
Subject: Re: Réf. : [SMARTY] Section Problem
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7227@lists.php.net to get a copy of this message
At 14:49 16.01.2003 +0100, philippe.morange@ca-indosuez.com wrote: Hello Philippe,
while ($Row = $Result->fetchRow()){
      $result[] = array( 'pid' => $Row[0],
                         'thema' => $Row[1] );
} $smartytemp->assign("result", $result); $smartytemp->display("cat_closed2.tpl");
And change your {section} to be good: {section name=schuu loop=$result} PID: {$result[schuu].pid}&nbsp;&nbsp;&nbsp; THEMA: {$result[schuu].thema}<br> {sectionelse} There are no values to loop through. {/section}
Thats what i tried before. Here is the output what i get:
PID: 1    THEMA: Haarpflege
PID: 1    THEMA: Haarpflege
PID: 2    THEMA: Körperpflege
PID: 1    THEMA: Haarpflege
PID: 2    THEMA: Körperpflege
PID: 5    THEMA: Haarausfall
But thats the wrong output. The ouput has to be:
PID: 1    THEMA: Haarpflege
PID: 2    THEMA: Körperpflege
PID: 5    THEMA: Haarausfall
Whats going wrong? THX Frank

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