Re: Inserting into the middle of an array

From: Date: Sun, 01 Apr 2001 18:57:14 +0000
Subject: Re: Inserting into the middle of an array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-46519@lists.php.net to get a copy of this message
----- Original Message ----- From: "Lindsay Adams" <lindsay@dingos.net> > On 4/1/01 11:32 AM, "Yoshi Melrose" <webmaster@validus.com> wrote: > > > Ok. I must be soooo blind. Is there a function to insert a value into the > > middle of an array without rewriting it? > > > > > In PHP3, no. > PHP4, see http://www.php.net/manual/en/function.array.php > > You could pull it off with combinations of array_slice, array_splice, > array_merge, array_push... > > Lots of array functions in php4. > Okay. that's what I was afraid of. I was kinda hoping for an array_insert() function. =)

« previous php.general (#46519) next »