Re: Variables

From: Date: Tue, 20 Jun 2000 13:36:13 +0000
Subject: Re: Variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-2296@lists.php.net to get a copy of this message
> Hello PHP's Hello, > I have a small problem... > I have one php page from where i am generating an html form. > The name of the form can be anything that I dont' know(Generated by PHP) > Now when i Submit the form using POST method, I want to get those names and > their corresponding values(Just like PERL) > ie., if the form is having > <input type=text name=XYZ value=123> > then i want to get both XYZ and 123 in key[i] and value[i] respectively. > How to do this. $r["XYZ"] = 123; $r["ABC"] = 987; reset($r); // Reset internal array pointer to the start of the array while (list($key,$value) = each($r)) { echo "<input type=text name=$key value=$value>\n"; } Does that help? David.

« previous php.general (#2296) next »