Re: in the middle of shift and pop

From: Date: Wed, 20 Aug 2003 01:20:49 +0000
Subject: Re: in the middle of shift and pop
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-160110@lists.php.net to get a copy of this message
If you unset an array that isn't associative, will that mean there will be a gap in the numbers? Or will PHP realize "OK I need to change the numbers indexing the other elements"? -Dan On Tue, 2003-08-19 at 22:27, andu wrote: > On Wed, 20 Aug 2003 00:25:32 +0200 > Decapode Azur <blue_prawn@tuxfamily.org> wrote: > > > is it possible to remove an element of an indexed array such as this > > exemple > > $A = array('a', 'b', 'c', 'd', 'e', > > 'f'); > > in a way that we can optain this result : > > $A = array('a', 'b', 'd', 'e', 'f'); > > > > something like that perhaps ? > > array_remove($A, 2); > > > > If such a function does not exists, what would be the more efficient > > way to do so a lot of time on very big arrays ? > > unset(array[x]); > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > -- > Andu

« previous php.general (#160110) next »