note 17953 added to function.array-splice
| From: | mike at embimedia dot com | Date: | Fri, 04 Jan 2002 20:05:11 +0000 |
| Subject: | note 17953 added to function.array-splice | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-24404@lists.php.net to get a copy of this message | ||
Follow up example to Jesse@bend.com -- the returned value from array_splice is an array containing
the elements that are removed from the starting array.
$input = array ("red", "green", "blue", "yellow");
// $input => Array ( [0] => red [1] => green [2] => blue [3] => yellow )
$return = array_splice ($input, 2);
// $input => Array ( [0] => red [1] => green )
// $return => Array ( [0] => blue [1] => yellow )
--
http://www.php.net/manual/en/function.array-splice.php
http://master.php.net/manage/user-notes.php?action=edit+17953
http://master.php.net/manage/user-notes.php?action=delete+17953
http://master.php.net/manage/user-notes.php?action=reject+17953