note 22263 added to function.array-splice
| From: | paule at cs dot tamu dot edu | Date: | Wed, 12 Jun 2002 13:59:00 +0000 |
| Subject: | note 22263 added to function.array-splice | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-31740@lists.php.net to get a copy of this message | ||
to kokos@lac.lviv.ua:
Good point about the code not doing what you expected.
The failure to check for the insert case like you pointed out is not a bug, however. I didn't
add code to handle that because the key of such an added index is more or less undefined in an
unordered associative array. Put another way, if your array is associative and not auto-indexed, you
most likely care enough about your keys to want to set them explicitly.
--
http://www.php.net/manual/en/function.array-splice.php
http://master.php.net/manage/user-notes.php?action=edit+22263
http://master.php.net/manage/user-notes.php?action=delete+22263
http://master.php.net/manage/user-notes.php?action=reject+22263