note 44027 added to function.isset
| From: | Chris at rn2 dot php dot net | Date: | Tue, 13 Jul 2004 05:02:47 +0000 |
| Subject: | note 44027 added to function.isset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-73128@lists.php.net to get a copy of this message | ||
Note that:
if (!isset($type = $_GET['type']))
{ /* invalid, missing type */ }
does NOT work (you get a parse error). Instead, you have to do:
$type = $_GET['type'];
if (!isset($type))
{ /* invalid, missing type */ }
Which is to say that you cannot do an assignment in an isset() test.
----
Manual Page -- http://www.php.net/manual/en/function.isset.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44027
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44027&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44027&report=yes
Search -- http://master.php.net/manage/user-notes.php