note 41361 deleted from function.import-request-variables by aidan
| From: | aidan@php.net | Date: | Thu, 09 Sep 2004 09:13:43 +0000 |
| Subject: | note 41361 deleted from function.import-request-variables by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-76286@lists.php.net to get a copy of this message | ||
Note Submitter: dhruba at NOSPAM dot codewordt dot co dot uk
----
import_request_variables() is a convenient function. However, it works for every single variable
present in the superglobal. If you wish to make available only a small subset of all variables
present in the superglobal then the code fragment below may be of some use.
<?php
$input_vars = array('var1','var2','var3','var4');
foreach ($input_vars as $var) {
if (!empty($_GET[$var])) { $$var = $_GET[$var]; }
else { $$var = NULL; }
}
?>