Re: [SMARTY] New plugin and an arrays question
| From: | Stealth Dave | Date: | Wed, 05 Jun 2002 23:41:35 +0000 |
| Subject: | Re: [SMARTY] New plugin and an arrays question | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4639@lists.php.net to get a copy of this message | ||
Oops! I forgot to provide a link to the plugin:
http://www.wiskars.com/Smarty/#assign_array
- Dave
On Wed, 2002-06-05 at 16:03, Stealth Dave wrote:
> Hello, all. I have a new plugin to share with the group. It's an
> extension of the existing assign_arrays plugin found in the
> contribs/plugins area of the Smarty web site. My modification also
> allows you to create associative arrays with the plugin. Here's some
> examples using the new plugin:
>
> {assign_array var="foo" values="bar1,bar2"}
> {assign_array var="foo" values="bar1;bar2;bar3" delimiter=";"}
> {assign_array var="foo" values="bar1,bar2" keys="key1,key2"}
>
> Now to my question. I'm trying to access an array in php that has been
> assigned to the smarty object. However, whenever I try to recall that
> array, all I get in return is a single element array containing the word
> "Array". I'm trying to pass the array to a function using {insert}, but
> that doesn't work. I've also tried just passing the name and using
> $smarty->_tpl_vars["varname"] to access it, but I get the same problem.
> Any suggestions on how I can access an smarty var which is an array from
> PHP?
>
> Thanks,
> - Dave
--
David E. Still phone:818.980.6909
dave@stilldesigning.com http://www.stilldesigning.com