Re: Help retrieving an HTML array

From: Date: Wed, 01 Feb 2006 16:13:06 +0000
Subject: Re: Help retrieving an HTML array
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-229639@lists.php.net to get a copy of this message
Mauricio Pellegrini wrote:
Hi , I have a HTML page with a form in which there are some inputs like these: input type=text name=xname value="3303" input type=text name=xname value="9854" .... input type=text name=xname value="n..." the name of the input is always the same ( xname ) This generates automatically generates an array named xname in HTML with all the diferent values assigned to a diferent position. My question is : How do I retrieve that array from within PHP ? I've tryed the following $xname=$_REQUEST['xname']; and then echo $xname[0][0] ; // this returns nothing
	echo $xname[0] ;    // this returns only first digit of the first input 
None of the above seem to recognize that xname is ( in HTML ) an array . Any help greatly appreciated Thanks Mauricio
Try print_r ($sendedArrayName); And look if there are even values in it. print_r($_POST["xname"]); for example If this is empty create your code like: input type="text" name="xname[]" value="blah1" input type="text" name="xname[]" value="blah2" ... and so on HTH Barry -- Smileys rule (cX.x)C --o(^_^o)

« previous php.general (#229639) next »