Re: Value of an associative Array as an array index
| From: | Lars Noschinski | Date: | Sun, 05 Jan 2003 16:28:51 +0000 |
| Subject: | Re: Value of an associative Array as an array index | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7021@lists.php.net to get a copy of this message | ||
james@ractive.ch (Jean-Pierre Bergamin) writes:
> Isn't it possibe to use a value of an associative array as an index for
> another array?
Only with a work around:
PHP:
$arr1[$arr2['foobar']]
Smarty:
{assign var='index' value=$arr2.foobar}
{$arr1.$index}