Re: Help retrieving an HTML array

From: Date: Wed, 01 Feb 2006 17:19:53 +0000
Subject: Re: Help retrieving an HTML array
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-229655@lists.php.net to get a copy of this message
Thank you all for your valuable support. The problem is solved. Note: This kind of input definition (without the brackets) actually *DOES* create an array under HTML 4.x (and its subindexes are accesible thru javascript) <input type="text" name="xname" value="3303" <input type="text" name="xname" value="9854" Regards, Mauricio On Wed, 2006-02-01 at 13:17, Robert Cummings wrote: > You forgot the array append operator: > > <input type="text" name="xname[]" value="3303" > <input type="text" name="xname[]" value="9854" > .... > <input type="text" name="xname[]" value="n..." > > I also took the liberty of adding double quotes to your attributes. There's no > excuse for writing slop. > > To see what that produces... get used to doing: > > echo '<pre>'."\n"; > print_r( $_POST ); > echo "\n".'</pre>'; > > Cheers, > Rob.

« previous php.general (#229655) next »