Variable in a variable.
| From: | Milton Thomas | Date: | Tue, 01 Aug 2000 23:47:22 +0000 |
| Subject: | Variable in a variable. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-9570@lists.php.net to get a copy of this message | ||
I have some variables in a form
they are name, year, url.
I have 10 rows of these variables.
so the are named name1, year1, url1, name2, year2, url2.....
when i click submit i want to create a loop from 1 to 10 and read these
variables.
eg.
for($x=1;$x<=10;$x++){
$name_var = "$"."name".$x
echo $$name_var
}
what i am expecting is..
eg name1 ="milton"
$name_var="$name1";
$$name_var ="milton"
this worked in PHP3
I cant get it to work now.
any suggestion
Milton C. Thomas
Freelance Web Developer
Resume : http://resumes.dice.com/millie