Re: [SMARTY] html_options 2.2x vs 2.5.0

From: Date: Sat, 24 Jan 2004 15:43:01 +0000
Subject: Re: [SMARTY] html_options 2.2x vs 2.5.0
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10872@lists.php.net to get a copy of this message
messju mohr wrote:
how does your {html_options}-statement look? did you check if the values you assigned are correct?
smarty-2.6.0 says: <select name=customer_id> {html_options options=$customer_options selected=$customer_id} </select> so i did: the data ist in an array, which is generated from a database : if ($read->db_query('SELECT id, name FROM '.DB_TBL ) { while ($read->get_data()) $opt[$read->id] = $read->name; } $tpl->assign('options', do_select_db()); template: <select name="db_name"> {html_options options=$db_options} </select> i don't get it what is wrong. seems exactly like described in the docs. i was looking for some "readme"-files for updates 2.2->2.5/2.6 explaining what crucial changes there are in templates and code. thanks for your support. christian

« previous php.smarty.general (#10872) next »