Re: Array in a input transfered via post

From: Date: Fri, 21 Jul 2000 20:54:29 +0000
Subject: Re: Array in a input transfered via post
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-7626@lists.php.net to get a copy of this message
Did you / can you try using: < ...checkbox... name='thingarray[]' value='whatever value one'> < ...checkbox... name='thingarray[]' value='whatever value two'> < ...checkbox... name='thingarray[]' value='whatever value three'> The name='thingarray[]' syntax WILL allow you to access the values by _number_ <?echo $thingarray[2]?> What you previously seemed to want, my inference (( name='somearray[thing]' )) was a multidimensional array. If memory serves -- using something like name='somearray[thing][]' is possible in PHP4 though -- but better check doc's or message archives. HTH Tom Henry At 09:55 PM 7/21/00 +0200, Kim Noer wrote:
""Jeff Warrington"" <jaydub@bossanova.com> wrote in message news:8la5rb$u8o$1@toye.php.net... <input type='checkbox' name='checkboxen[]' value='hello'> This means that you should have an array on the action page of the form that should contain the checked inputs. Ah no. See later down I asign values to say somearray[thing]- alas I'm trying to keep the amount of arrays down to the minimum. But it really puzzles me why I can't use numbers as keys.. -- "Jeg er ikke helt sikker på hvad du mener med den temperatur. Men selvom pinden har en temperatur på 0 K, så er den stadig ikke uendeligt stiv." - Anonym. CPU stuff : http://home.worldonline.dk/~noer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
--------------------------------------------------------------------
Strategic Business Systems                  (978) 745-2332
                      http://BusinessWebs.com/
--------------------------------------------------------------------

« previous php.general (#7626) next »