Re: [SMARTY] Using variables to point to array positions.

From: Date: Fri, 16 May 2003 20:45:47 +0000
Subject: Re: [SMARTY] Using variables to point to array positions.
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9566@lists.php.net to get a copy of this message
> Hi All, > > {$ticket.users[$transaction.transactionCreator].name|escape:"htmlall"} > I have tried a number of different syntax changes but so far haven't had any > luck. Now if i replace $transaction.transactionCreator with 22 > then all is > well but i really need to be able to point to an array position with another > variable, can this be done? This one should work, i think (Smarty 2.5 RC2): {assign var=tmp value=$transaction.transactionCreator} {$ticket.users.$tmp.name|escape:"htmlall"} > William Bailey. -- Martel Valgoerad (a.k.a. Michal Minicki) | "Opinia publiczna to zdanie [AIE]Martel --> martel@post.pl | ludzi, ktorych normalnie Web Page: http://www.aie.pl | nikt o zdanie nie pyta."

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