Re: is it possible to give a select element a new options-array ?

From: Date: Wed, 06 Dec 2006 01:11:30 +0000
Subject: Re: is it possible to give a select element a new options-array ?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25979@lists.php.net to get a copy of this message
Yes, you can't remove select options. Remove the element and add another one. > Hi everybody, > > I am working with some really ... strange scripts right now. > > My problem is, that I have a select: > > $newform->addElement( 'select', 'positioning', 'Position:', > $position ) ; > [...] > This form is cloned along the way via > $newer_form = serialize(unserialize( $newform)) ; > > But now I want to change the select-list because $position has changed. > I tried: > $newer_form->loadArray( $position) ; > > But: > > load() and loadArray only append to the existing array I need something > like refresh Array... > > Or do I have to delete the Select-Object and add it again ? > > Thanks for reading, > > Bjoern. >

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