Re: dynamic arraynames

From: Date: Thu, 28 Nov 2002 01:24:57 +0000
Subject: Re: dynamic arraynames
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-126383@lists.php.net to get a copy of this message
Well I might be in the wrong place. I've also asked in the HTML list now too but I'm still stuck and need some help. This is pretty much as clear as I can make it. I'm up against a mental block and even if it's as clear as glass to others I'm dead in the water and would appreciate some pointers. I have a bunch of pieces but can't seem to string them together enough to make it work. Just trying to build an x-y array of data input fields and then send them recursive to be used further down the program. I can do this fine with a fixed number of columns and rows of user input but I cannot figure out how to make this happen using a variable number of columns. I'm a complete array amateur and would appreciate a little assistance... I want it to look something like this: Name Temp Time Offset Etc. As needed... process 1 [input] [input] [input] [input] [inputs] process 2 [input] [input] [input] [input] [inputs] process 3 [input] [input] [input] [input] [inputs] process 4 [input] [input] [input] [input] [inputs] Right now, for the three *basic* columns, I have the lines below in a 'while' loop. <INPUT TYPE='text' NAME='temp[]' VALUE='$temp' SIZE='10' MAXLENGTH='10'> <INPUT TYPE='text' NAME='time[]' VALUE='$time' SIZE='10' MAXLENGTH='10'> <INPUT TYPE='text' NAME='offs[]' VALUE='$offs' SIZE='10' MAXLENGTH='10'> But when it comes to adding additional columns that a user determines are needed, I am lost. Users might want to add 0, or 4, or 10 additional items... I would like only that number of usable input columns be on the input-form, identified for what they contain, and then be passed to the next page.... Again, many thanks in advance. Floyd On Sun, 24 Nov 2002 23:55:56 -0500, you wrote: >I'm sorry, but I'm still confused. Can you show us a sample of the data >in the database and what you want the resulting form to look like for >that data? Maybe that'll help. > >---John Holmes... --

« previous php.general (#126383) next »