Re: [SMARTY] Smarty Syntax Error

From: Date: Tue, 11 Nov 2003 14:02:51 +0000
Subject: Re: [SMARTY] Smarty Syntax Error
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10519@lists.php.net to get a copy of this message
Webmaster wrote:
<input type="hidden" name="artikel_id[{$smarty.section.i.index}]" value="{$dataItems[{$smarty.section.i.index}].d_artikelnummer}" /> Smarty gives me an error message, but I don't how to write in in another way.
Once you're in smarty-code (i.e. between 2 {}) you can access vars simply by their name, so you don't need extra parentheses. so you're code would be: <input type="hidden" name="artikel_id[{$smarty.section.i.index}]" value="{$dataItems[$smarty.section.i.index].d_artikelnummer}" /> see the difference? regards, martin -- Shall we hit it and quit? Yeah, hit it and quit? OK? Hit it!

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