Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

array_key_exists vs isset

$a = array('key1' => 'text', 'key2' => null);

isset($a['key1']);             // true
array_key_exists('key1', $a);  // true

isset($a['key2']);             // false
array_key_exists('key2', $a);  // true
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #isset
ADD COMMENT
Topic
Name
6+4 =