Re: Inserting into the middle of an array
| From: | Lindsay Adams | Date: | Sun, 01 Apr 2001 18:45:16 +0000 |
| Subject: | Re: Inserting into the middle of an array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-46516@lists.php.net to get a copy of this message | ||
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.