Re: [SMARTY] Accessing arrays in value-property of {assign}
| From: | Ronny 'Ronino' Multrus | Date: | Fri, 14 Mar 2003 15:03:00 +0000 |
| Subject: | Re: [SMARTY] Accessing arrays in value-property of {assign} | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8656@lists.php.net to get a copy of this message | ||
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