Re: [SMARTY] Simple variable/array/assign-problem? Associative array using a variable to point

From: Date: Thu, 17 Oct 2002 14:45:38 +0000
Subject: Re: [SMARTY] Simple variable/array/assign-problem? Associative array using a variable to point
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6187@lists.php.net to get a copy of this message
On Thu, Oct 17, 2002 at 04:34:15PM +0200, Johannes Schill wrote: > Hi. > > I made a plugin for it. Works well now, thank you. > > Cheers. > > Johannes > > > ----- Original Message ----- > From: "Johannes Schill" <johannes.schill@polyester.se> > To: <smarty-general@lists.php.net> > Sent: Thursday, October 17, 2002 3:28 PM > Subject: [SMARTY] Simple variable/array/assign-problem? Associative array > using a variable to point > > > > Hello again, > > > > My problem this time: > > > > This works: > > {assign var="tmp" value=$silverData[258]} > > > > But this doesnt work: > > {assign var="offer_id" value=258} > > {assign var="tmp" value=$silverData[$offer_id]} > > > > I need to dynamically (using an variable, $offer_id), point to a post in > an > > array ($silverData). Is there a workaround? no need for a plugin here: {assign var="tmp" value=$silverData.$offer_id} should do. have fun messju > > Best regards, > > Johannes Schill > > > > > > > > -- > > Smarty General Mailing List (http://smarty.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

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