note 11365 added to isset
| From: | ryan at canyoneering dot com | Date: | Sun, 18 Feb 2001 03:52:15 +0000 |
| Subject: | note 11365 added to isset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-11197@lists.php.net to get a copy of this message | ||
I'm trying to dynamically see if a variable from a form is set or not. But it seems like the
isset command does not transform the $$ into the form variable before it evaluates it because it is
always read as set even though it is not. Any ideas on how to get past this?
$qid = db_query("select * from location");
while ($myrow = db_fetch_array($qid))
{
$str_region="region".$myrow["locationid"];
if(!empty($$str_region))
{
$loc=$myrow["locationid"];
$qid2 = db_query("insert into gbregion values($bookid,$loc)");
}
}
http://www.php.net/manual/en/function.isset.php