|
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 |
Crutis Smarty n00b
Joined: 27 Sep 2010 Posts: 3
|
Posted: Mon Sep 27, 2010 11:02 pm Post subject: QUESTION: Using variable name as string |
|
|
I've read faq, was searchin forum. but didn't found a solution
The problem is
i have a foreach, and another foreachES inside the first one.
i've assigned arrays to "foreaching" inner selectors, but they have names like $selector_type5, $selector_type7 etc.
{$item.type} in parent foreach contains type of selector, but i can't place it to the "from" in inner foreaches.
Is the way out exists?
Code: |
{foreach key=key item=item from=$anywherefields}
{$item.name}
{$item.type}
{foreach key=key item=sele from=$selector_$item.type}
<option value="{$sele.id}">{$sele.title}</option>
{/foreach}
{/foreach} |
Thx a lot! |
|
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
|