note 24341 deleted from language.variables.variable by maxim
| From: | maxim@php.net | Date: | Tue, 13 Aug 2002 20:09:05 +0000 |
| Subject: | note 24341 deleted from language.variables.variable by maxim | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-34957@lists.php.net to get a copy of this message | ||
Here's a simple example that writes a hidden form field when passed the variable name.
function print_hidden($el){
GLOBAL ${$el};
echo("<input type=hidden name=$el value='" . ${$el} . "'>");
}
so...
print_hidden('id');
will store the value of $id in a hidden form field.
Same as typing:
<input type=hidden name=id value='$id'>