note 23441 added to function.array
| From: | John@php.net | Date: | Thu, 18 Jul 2002 15:48:35 +0000 |
| Subject: | note 23441 added to function.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-33256@lists.php.net to get a copy of this message | ||
Be careful not to create an array on top of an already existing variable:
$name = "John";
$name['last'] = "Doe";
$name becomes "Dohn" since 'last' evaluates to the 0th position of $name.
Same is true for multi-arrays.
--
http://www.php.net/manual/en/function.array.php
http://master.php.net/manage/user-notes.php?action=edit+23441
http://master.php.net/manage/user-notes.php?action=delete+23441
http://master.php.net/manage/user-notes.php?action=reject+23441