Re: [SMARTY] html options and section
| From: | Monte Ohrt | Date: | Mon, 22 Apr 2002 16:38:51 +0000 |
| Subject: | Re: [SMARTY] html options and section | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3837@lists.php.net to get a copy of this message | ||
As for performance, it doesn't matter. So it is a matter of neatness. Would you rather use this:
{html_options options=$foo selected=$foo_sel}
or this:
{section name=foo loop=$bar}
<option name="{$bar[foo].name}" {if $bar[foo].name eq $foo_sel}selected{/if}>{$bar[foo].output}</option>
{/section}
Blue Presley wrote:
are there any advantages or disadvantages to using either {html_options} or {section}{/section} to loop through and create a <select> list for a form? thx, blue-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.