RE: [PHP] Need some advice concerning forms (multi select pulldown) and arrays

2002-05-27 Thread John Holmes
TED]; [EMAIL PROTECTED] > Subject: Re: [PHP] Need some advice concerning forms (multi select > pulldown) and arrays > > Ok, I can't get this right... > > Have the following code: > > >$choices = array(1 => 'dog',

Re: [PHP] Need some advice concerning forms (multi select pulldown)and arrays

2002-05-26 Thread Miguel Cruz
On Sun, 26 May 2002, Victor Spång Arthursson wrote: > change this to: > and this to: because you want animals[2] and animals[4] to be arrays, not scalar values. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.

Re: [PHP] Need some advice concerning forms (multi select pulldown) and arrays

2002-05-26 Thread Victor Spång Arthursson
unt($select); > > You can get a count of how many elements were selected within a select > you can do this: > > count($select[x]); > > Where x is the number of the select box you want to know about. > > Confusing, eh? > > ---John Holmes... > >> -Original Mess

Re: [PHP] Need some advice concerning forms (multi select pulldown) and arrays

2002-05-26 Thread Victor Spång Arthursson
On Sunday, May 26, 2002, at 01:14 PM, John Holmes wrote: > Just give each select its own name. Can't do that, don't know from time to time how many there'll be And I've to have some case which iterates on the following page... > Or name them all the same followed > by an [] and you'll end

RE: [PHP] Need some advice concerning forms (multi select pulldown) and arrays

2002-05-26 Thread John Holmes
May 26, 2002 5:49 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Need some advice concerning forms (multi select > pulldown) and arrays > > Hello and thanks for your fast answer! > > I'ld like to know if there is any possibility to distinguish the selects > if I'

Re: [PHP] Need some advice concerning forms (multi select pulldown) and arrays

2002-05-26 Thread Victor Spång Arthursson
Hello and thanks for your fast answer! I'ld like to know if there is any possibility to distinguish the selects if I've multiple multiple selects, that is, more than one on the same page? What I'm loooking for is the possibility to have an unknown number of multiple selects on the same page...

Re: [PHP] Need some advice concerning forms (multi select pulldown)and arrays

2002-05-25 Thread Miguel Cruz
Oops. I actually tried running it (cleverly waiting until after I posted it to the list) and I see that there are some warnings in the event that nothing has been selected (due to in_array operating on an undefined variable). Don't worry about them. Or change that last foreach clause to look l

Re: [PHP] Need some advice concerning forms (multi select pulldown)and arrays

2002-05-25 Thread Miguel Cruz
On Sat, 25 May 2002, Victor Spång Arthursson wrote: > I know it's possible to use arrays in combination with forms, but I need > some advice about where to find some information/tutorial concerning how > to use arrays together with "multi-select-tags"... Have a play with this little program - it

[PHP] Need some advice concerning forms (multi select pulldown) and arrays

2002-05-25 Thread Victor Spång Arthursson
Hello! I know it's possible to use arrays in combination with forms, but I need some advice about where to find some information/tutorial concerning how to use arrays together with "multi-select-tags"... Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis