Re: HTML_Quickform question

From: Date: Tue, 08 Jun 2004 21:57:19 +0000
Subject: Re: HTML_Quickform question
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13018@lists.php.net to get a copy of this message
John Lawson wrote: >Hi, > I am trying to populate a list box with data from a database. I am using >the following syntax, where select_data is an array containing descriptions; > $form->addElement('select', > 'select_name', // name of select > 'select_label', // label for select > $select_data); > >I just can't see how to set the"<option value>" to values I can use - I >don't want the default option values which are being created. (0,1,2...n) > >Is this possible to achieve? >Thanks in anticipation. Use an associative array. Then read the documentation, there is info in there too. Then look at the examples. Bertrand Mansion Mamasam

« previous php.pear.general (#13018) next »