Accessing Smarty arrays with variable keys
| From: | David Heinemeier Hansson | Date: | Fri, 14 Dec 2001 15:37:31 +0000 |
| Subject: | Accessing Smarty arrays with variable keys | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-2297@lists.php.net to get a copy of this message | ||
It doesn't seem to be possible to access a Smarty array with a variable
key, like this:
{assign var="key" value="home"}
{$Contacts.phone.$key}<
Anyone got a work-around that'll archive the same goal? If not, I'd like
to request adding this possibility to a future version of Smarty.
--
David Heinemeier Hansson <david@loudthinking.com>
http://www.LoudThinking.com/ -- Weblog on software and
media