note 14684 added to function.isset.php
| From: | lbarry at nuvox dot com | Date: | Thu, 09 Aug 2001 06:22:30 +0000 |
| Subject: | note 14684 added to function.isset.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16503@lists.php.net to get a copy of this message | ||
Checking set/empty conditions for POSTed variables for each point in an array (yup two comments at
once) was acheived as follows using isset:
<?
$formvars = array(var1, var2, var3, var4);
/* Note '$' has been removed from vars. */
foreach ($formvars as $var) {
if (isset(${$var})) {
print $var."has been set to". ${$var};
}}
?>
Please forgive spacing.
http://www.php.net/manual/en/function.isset.php