Re: [SMARTY] assign

[email protected] (Ade Olonoh) Wed, 19 Apr 2006 15:27:36 -0400
Newsgroups php.smarty.general
Message-ID <[email protected]>
I don't think you can assign more than one variable. 

There might be something better, but I've been able to initialize an
array with this hack:

    {assign var="foo" value=","|explode:"1,2,3,4,5"}

This will create an array named "foo" with values 1-5.


Urb LeJeune wrote:
> Within a template is it possible to assign more than one variables
> within a  {assign var="foo" value="Smarty"} statement?
>
> Also is it possible to initialize an array within
> an {assign} statement?
>
>         Thanks
>
> Urb
>
-- 

Ade Olonoh, Owner/Software Developer
Recursive Function, LLC - Web-based software development
http://recursivefunction.com | http://www.formspring.com