Re: [SMARTY] Accessing arrays in value-property of {assign}

From: Date: Fri, 14 Mar 2003 15:59:15 +0000
Subject: Re: [SMARTY] Accessing arrays in value-property of {assign}
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8658@lists.php.net to get a copy of this message
backticks are only for variables imbedded in double quotes. On Fri, 2003-03-14 at 09:03, Ronny 'Ronino' Multrus wrote: > Am Freitag, 14. März 2003 15:10 erreichte mich diese Nachricht: > > On Fri, Mar 14, 2003 at 03:00:01PM +0100, Ronny 'Ronino' Multrus wrote: > > > Hello, > > > > > > is there any way of assigning values of an array in {assign}? > > > > > > {assign var="someVar" value="$someArray.someValue"} > > > > use {assign var="someVar" value=$someArray.someValue} > Okay, thx, this works for known array members, but not dynamic ones between > backticks: > > {section name="images" loop=3} > {assign var="picNum" value=$smarty.section.images.iterator} > {assign var="pic_text" > value=$smarty.post.pic_picNumtext} > <b>{$pic_text}</b> > {/section} > > I get: > Fatal error: Smarty: [in template.tpl line 8]: syntax error: $smarty. is an > unknown reference (Smarty_Compiler.class.php, line 1759) in > /path/to/Smarty_Compiler.class.php on line 1812 > > Hmm. > > Ronino -- Monte Ohrt <monte@ispi.net>

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