note 53871 added to function.isset
| From: | spamme_AT_bluewin dot ch at osu1 dot php dot net | Date: | Wed, 15 Jun 2005 16:48:18 +0000 |
| Subject: | note 53871 added to function.isset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-90481@lists.php.net to get a copy of this message | ||
I have a strange problem:
function test($b){
if(isset($$b)) {
echo "hello";
}
}
$a = "_SERVER";
test($a);
if(isset($$a)) {
echo "it works";
}
Hello never work as it is in a function. But when the test is done outside the fonction it works
----
Manual Page -- http://www.php.net/manual/en/function.isset.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53871
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53871&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53871&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53871&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53871&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53871&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53871&report=yes
Search -- http://master.php.net/manage/user-notes.php