|
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 |
marco5 Smarty Rookie
Joined: 28 Jul 2003 Posts: 19
|
Posted: Tue Jul 29, 2003 5:47 pm Post subject: html_options problem |
|
|
Code: |
<?
$country=array("hk","tw","cn","sg");
?>
<select name="location">
{html_options values=$country options=$country selected=$location }
</select>
|
it will be output:
<select name="location">
<option label="hk" value="0">hk</option>
<option label="tw" value="1">tw</option>
<option label="cn" value="2">cn</option>
<option label="sg" value="3">sg</option>
</select>
but it is not i want!!
i want this:
<select name="location">
<option label="hk" value="hk">hk</option>
<option label="tw" value="tw">tw</option>
<option label="cn" value="cn">cn</option>
<option label="sg" value="sg">sg</option>
</select>
how can i solve it!!? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Tue Jul 29, 2003 7:01 pm Post subject: |
|
|
Code: | {html_options name="location" values=$country output=$country selected=$location } | should do |
|
Back to top |
|
marco5 Smarty Rookie
Joined: 28 Jul 2003 Posts: 19
|
|
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
|