note 9207 added to array_splice

From: Date: Sun, 22 Oct 2000 22:16:22 +0000
Subject: note 9207 added to array_splice
Groups: php.notes 
Request: Send a blank email to php-notes+get-6834@lists.php.net to get a copy of this message
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); http://www.php.net/manual/function.array-splice.php

« previous php.notes (#6834) next »