note 26744 added to function.array-splice
| From: | tsunaquake at rack1 dot php dot net | Date: | Mon, 11 Nov 2002 16:56:24 +0000 |
| Subject: | note 26744 added to function.array-splice | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-39301@lists.php.net to get a copy of this message | ||
It is possible to use a string instead of offset, eg if you want to deletre the entry
$myArray['entry'] then you can simply do it like this:
array_splice($myArray, 'entry', 1);
Note that you can use unset($myArray['entry']) as well but then, it doesn't enable
you to remove more than one entry and it doesn't replace anything in the array, if that's
what you intend to do.
--
http://www.php.net/manual/en/function.array-splice.php
http://master.php.net/manage/user-notes.php?action=edit+26744
http://master.php.net/manage/user-notes.php?action=delete+26744
http://master.php.net/manage/user-notes.php?action=reject+26744