note 87713 added to language.types.array
| From: | DawidKrysiak at osu1 dot php dot net | Date: | Wed, 17 Dec 2008 23:09:12 +0000 |
| Subject: | note 87713 added to language.types.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-148285@lists.php.net to get a copy of this message | ||
Trying to get array element that was not set, throws ERROR_NOTICE and returns NULL. Example:
<?php /* php v.4.4.7 */
$array = array(
'apple' => 'green',
'orange' => 'orange',
);
$pear_color = $array['pear']; // Notice: Undefined index: pear in /path/to/file.php on
line 123
var_dump($pear_color); // NULL
?>
Haven't found that mentioned on this page.
----
Server IP: 82.177.164.100
Probable Submitter: 212.14.58.157
----
Manual Page -- http://www.php.net/manual/en/language.types.array.php
Edit -- https://master.php.net/note/edit/87713
Del: integrated -- https://master.php.net/note/delete/87713/integrated
Del: useless -- https://master.php.net/note/delete/87713/useless
Del: bad code -- https://master.php.net/note/delete/87713/bad+code
Del: spam -- https://master.php.net/note/delete/87713/spam
Del: non-english -- https://master.php.net/note/delete/87713/non-english
Del: in docs -- https://master.php.net/note/delete/87713/in+docs
Del: other reasons-- https://master.php.net/note/delete/87713
Reject -- https://master.php.net/note/reject/87713
Search -- https://master.php.net/manage/user-notes.php