note 9207 deleted from function.array-splice by felipe
| From: | felipe@php.net | Date: | Sat, 29 Dec 2007 19:00:39 +0000 |
| Subject: | note 9207 deleted from function.array-splice by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134176@lists.php.net to get a copy of this message | ||
Note Submitter: info at borderblue dot com
----
note that unset() works well for associative arrays, but if you have
$blah = array("a","b","c","d");
and you unset($blah[2]), then the other
elements will not shift, i.e., you'll still have $blah[0], $blah[1], and $blah[3]. If you need
things to shift, use
array_splice($blah,2,1);