note 2732 modified in Variable variables by jeroen
| From: | jeroen@php.net | Date: | Thu, 24 May 2001 00:13:08 +0000 |
| Subject: | note 2732 modified in Variable variables by jeroen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-14232@lists.php.net to get a copy of this message | ||
Concerning the ${x_$n} trick. It's a typical task to process several (the exact number may be
unknown) files uploaded via an html form. You get them as file1, file2, ... , file"n" in
PHP.
for($i=1;${"file".$i};$i++) {
echo(${"file".$i});
}
Note the quotes.
http://www.php.net/manual/variable-variables.php