|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
san Smarty n00b
Joined: 14 Apr 2004 Posts: 3 Location: Germany
|
Posted: Thu Apr 15, 2004 7:55 am Post subject: Array in an array |
|
|
How do I translate the following to smarty?
$some_array[$array_in_an_array[$the_interesting_object]]['value']
thanks!
San. |
|
Back to top |
|
san Smarty n00b
Joined: 14 Apr 2004 Posts: 3 Location: Germany
|
Posted: Thu Apr 15, 2004 11:49 am Post subject: |
|
|
After trying some stuff I found that the following works:
{assign var="temp" value=$some_array.$array_in_an_array.$the_interesting_object}
{$temp.value}
Is there a faster (one statement) way to do this? |
|
Back to top |
|
electr0`n Guest
|
Posted: Thu Apr 15, 2004 4:49 pm Post subject: |
|
|
{$some_array.$array_in_an_array.$the_interesting_object.value} should work. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Apr 15, 2004 5:51 pm Post subject: |
|
|
electr0`n wrote: | {$some_array.$array_in_an_array.$the_interesting_object.value} should work. |
it shouldn't. it would give
$some_array[$array_in_an_array][$the_interesting_object]['value']
but he wants
$some_array[$array_in_an_array[$the_interesting_object]]['value'] |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|