On Tue, 13 Mar 2001 05:08, Brandon Orther wrote:
> Hello,
>
> I want to take one element out of an array, is there a way to remove an
> element and have the array resorted so there isn't a blank spot where I
> remove the elements? Here is an example if the above text made no
> sense.
>
> Example: $array = Array("1", "2", "3", "4");
>
> So: $array[0] = 1, $array[1] = 2, $array[2] = 3, $array[3] = 4
>
> I want to kick $array[2] out and have $array[3] be moved to $array[2]
>
> Thank you,
>From a quick look at the array functions, it seems like array_splice
might do the trick. It's PHP4 only, though.
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]