note 65504 added to function.array-splice
| From: | sven at meganet dot hr | Date: | Tue, 02 May 2006 10:02:26 +0000 |
| Subject: | note 65504 added to function.array-splice | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-110350@lists.php.net to get a copy of this message | ||
the bellow example doesn't work for me when the array key is not an integer...
<?php
$input = array("red", "green", "blue", "yellow");
array_splice($input, 2);
// $input is now array("red", "green")
?>
so for keys which are not integers use...
<?php
$input = array("red" => "green", "blue" => "yellow");
array_splice($input, 0, 1);
// $input is now array("red" => "green")
?>
----
Server IP: 161.53.30.180
Probable Submitter: 194.152.207.83
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.array-splice.php
Edit -- http://master.php.net/note/edit/65504
Del: integrated -- http://master.php.net/note/delete/65504/integrated
Del: useless -- http://master.php.net/note/delete/65504/useless
Del: bad code -- http://master.php.net/note/delete/65504/bad+code
Del: spam -- http://master.php.net/note/delete/65504/spam
Del: non-english -- http://master.php.net/note/delete/65504/non-english
Del: in docs -- http://master.php.net/note/delete/65504/in+docs
Del: other reasons-- http://master.php.net/note/delete/65504
Reject -- http://master.php.net/note/reject/65504
Search -- http://master.php.net/manage/user-notes.php