Date: 10/29/01
- Next message: Ricky Theil: "RE: [PHP-DB] HELP PLEASE!! Get query error when inserting into My Sql"
- Previous message: Mark Newnham: "RE: [PHP-DB] Variables in a loop"
- Maybe in reply to: LeTortorec, Jean-Louis: "[PHP-DB] Variables in a loop"
- Next in thread: * R&zE:: "Re: [PHP-DB] Variables in a loop"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Lookup "Variable Variables" in the PHP manual. You'll use something like:
${$i}
-----Original Message-----
From: LeTortorec, Jean-Louis [mailto:JLeTortorec <email protected>]
Sent: Monday, October 29, 2001 3:04 PM
To: 'php-db <email protected>'
Subject: [PHP-DB] Variables in a loop
I'm trying to write a loop to read variables I receive from a form:
<form ...>
<input name=a1 value=..>
<input name=a2 value=..>
<input name=a3 value=..>
<input name=a4 value=..>
I'd like to get something like:
for ($i=1; $i<=10; $i++) { $tab[$i]="a".$i ;}
The expression "a".$i is actually a string, not a variable. Any idea how to
"read" the value of that string?
Thanks for your help.
Jean-Louis
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Ricky Theil: "RE: [PHP-DB] HELP PLEASE!! Get query error when inserting into My Sql"
- Previous message: Mark Newnham: "RE: [PHP-DB] Variables in a loop"
- Maybe in reply to: LeTortorec, Jean-Louis: "[PHP-DB] Variables in a loop"
- Next in thread: * R&zE:: "Re: [PHP-DB] Variables in a loop"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

