note 90880 added to function.isset
| From: | contact at xtrmaddons dot com | Date: | Thu, 14 May 2009 12:12:19 +0000 |
| Subject: | note 90880 added to function.isset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-154588@lists.php.net to get a copy of this message | ||
isset($abc['aaaaaaa']) is simply bad syntax writing !
you must use array_key_exists('aaaaaaa', $abc) instead.
return true only if the array key exists
The same syntax error isset($abc->aaaaaaa)
array_key_exists( 'aaaaaaa', get_object_vars( $abc ) )
return true only if the object var exists
----
Server IP: 69.147.83.197
Probable Submitter: 90.5.225.210
----
Manual Page -- http://www.php.net/manual/en/function.isset.php
Edit -- https://master.php.net/note/edit/90880
Del: integrated -- https://master.php.net/note/delete/90880/integrated
Del: useless -- https://master.php.net/note/delete/90880/useless
Del: bad code -- https://master.php.net/note/delete/90880/bad+code
Del: spam -- https://master.php.net/note/delete/90880/spam
Del: non-english -- https://master.php.net/note/delete/90880/non-english
Del: in docs -- https://master.php.net/note/delete/90880/in+docs
Del: other reasons-- https://master.php.net/note/delete/90880
Reject -- https://master.php.net/note/reject/90880
Search -- https://master.php.net/manage/user-notes.php