[PHP-DB] Re: Dropdown menus from DB query

2004-06-18 Thread pete M
this is where smarty templating is so cool using PEAR db php code $sql = 'select id, name from names order by name asc'; $smarty->assign('names',$db->getAssoc($sql)); template {html_options options=$names} Cole Ashcraft wrote: How would you create a drop down menu from a database query? I have fi

Re: [PHP-DB] Dropdown menus from DB query

2004-06-18 Thread sam
hello. for my self, i hate to use \" beucase it gets me confuse all the time. my verison is echo " value ='" .$array['code']."'>.$array['name'].""; btw, you have a extra > at the end of your code. >echo " value=\"".$array["code"]."\">".$array["name"]."";> &

Re: [PHP-DB] Re: Dropdown menus from DB query

2004-06-18 Thread Cole Ashcraft
Smarty Templating? I've heard of that before, but can you tell me a little more about it? Is it built into PHP, or does it need to be installed separately? Thanks to everyone who helped me, Cole pete M wrote: this is where smarty templating is so cool using PEAR db php code $sql = 'select id, na

Re: [PHP-DB] Dropdown menus from DB query

2004-06-18 Thread Cole Ashcraft
No, the \ (backslash) tells PHP to echo the ". This prevents PHP from thinking that the quote means the end of an echo statement. Cole Shahmat Bin Dahlan wrote: I think this is the line which is the cause of your coding woes... The quote (") doesn't have any matching pair. There's one quote in fr

RE: [PHP-DB] Dropdown menus from DB query

2004-06-18 Thread Miguel Guirao
Actually is named a Scape Character Miguel Guirao Servicios Datacard www.SIASA.com.mx -Mensaje original- De: Cole Ashcraft [mailto:[EMAIL PROTECTED] Enviado el: Viernes, 18 de Junio de 2004 11:06 a.m. Para: [EMAIL PROTECTED] Asunto: Re: [PHP-DB] Dropdown menus from DB query No, the \ (b