|
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 |
Enquest Smarty Regular
Joined: 14 May 2003 Posts: 79
|
Posted: Wed Jun 11, 2003 7:26 pm Post subject: array syntax problem (small prob) |
|
|
I got the following array that I want to display correct in a html_option
Somehow I don't get the right syntax. Whats wrong.
the Array is
Code: |
Array ( [id] => 22 [id_plan] => 14 [action] => test [comment] => test [begindate] => 2003-06-11 [enddate] => 2003-06-11 [who] => Array ( [0] => admin [1] => William [2] => luc [3] => tom [4] => Richard [5] => Maya ) [tstamp] => 20030611210253 )
|
How do I display the who array. Note that this is all in a section.
Code: |
{section name=act loop=$action}
<tr bgcolor="{cycle values="#fcffe9,#ffefef"}">
...
<td><select>{html_options name=who option=$action[act].who}</select></td>
...
{/section}
|
The option box is always empty what ever syntax I try. _________________ -----------------------
Learning my self by trying to help others |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Wed Jun 11, 2003 8:27 pm Post subject: |
|
|
two things:
if you provide a "name"-attribute to html_options the plugin itself prints the <select> tag, so you don't have to put it into your section or you will end up in two nested <select>s.
the attribute is called "options" not "option" as in your example. maybe this is the source of all your trouble. |
|
Back to top |
|
Enquest Smarty Regular
Joined: 14 May 2003 Posts: 79
|
Posted: Wed Jun 11, 2003 8:41 pm Post subject: |
|
|
And I spend at least one hour looking at the syntaxs. Making sure that I didn't mis anything. And what is it a typo.
Any very much thanxs... _________________ -----------------------
Learning my self by trying to help others |
|
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
|