|
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 |
garryhs Smarty Rookie
Joined: 20 Jun 2004 Posts: 12 Location: Australia
|
Posted: Sun Jun 20, 2004 12:04 pm Post subject: Complax Arrays & Templates ? |
|
|
Hi all,
Can anybody help me.
Say I have an array in PHP like,
$colour["blue"]["dark"] = "bd";
Then I assign it so it can be used in my template...
$smarty->assign("colour", $colour);
Now, my question, in my template I have the values stored which could be used as a fast lookup...
{$colour_name}
{$colour_shade}
Can I display the value stored using {$colour.$colour_name.$colour_shade}
I am running smarty 2.5.0, unable to upgrade at this time.
I really do not want to do it like this...
{$colour.blue.dark}
Any Help would be appreciated... _________________ Thanks,
Garry |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
|
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
|