Re: [SMARTY] Smarty Syntax Error

From: Date: Tue, 11 Nov 2003 15:10:12 +0000
Subject: Re: [SMARTY] Smarty Syntax Error
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10520@lists.php.net to get a copy of this message
You are already within Smarty's context inside the first {} so you don't need the second set of braces: value="{$dataItems[$smarty.section.i.index].d_artikelnummer}" Cheers, Ray Webmaster <webmaster@dentona.de> wrote: > Hi, > > I have a problem with Smarty. > I am using a form in our online shop which uses two arrays. > In the first array the number of items that the user enters is stored. > The second hidden array contains the item number. > > The following code is part of code within a {section} > > <input type="text" name="anzahlNeu[{$smarty.section.i.index}]" > size="2" maxlength="2" > onfocus="document.all.rowcolor.{$smarty.section.i.index}.style.background='# > ffff00'" /> > <input type="hidden" name="artikel_id[{$smarty.section.i.index}]" > value="{$dataItems[{$smarty.section.i.index}].d_artikelnummer}" /> > > As one can see there are two opening braces in the second value="". > > Smarty gives me an error message, but I don't how to write in in > another way. > > Could anybody help? > > Thank you very much. > > Webmaster

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