Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-25-2003, 08:23 PM   PM User | #1
Josh Campbell
New Coder

 
Join Date: Jun 2002
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Josh Campbell is an unknown quantity at this point
Array stuff

In PHP, how do you remove an array element at a certain position or with a certain key?
Josh Campbell is offline   Reply With Quote
Old 03-25-2003, 09:05 PM   PM User | #2
Ökii
Regular Coder

 
Join Date: Jun 2002
Location: UK
Posts: 577
Thanks: 0
Thanked 0 Times in 0 Posts
Ökii is an unknown quantity at this point
I think array_splice() would get you closest - have a gander at that in the manual.
__________________
Ökii - formerly pootergeist
teckis - take your time and it'll save you time.
Ökii is offline   Reply With Quote
Old 03-25-2003, 11:03 PM   PM User | #3
Jason
Regular Coder

 
Join Date: Feb 2003
Location: California
Posts: 925
Thanks: 0
Thanked 0 Times in 0 Posts
Jason is an unknown quantity at this point
you would want to use array_splice()


array_splice(array, offset [ , length] [ , replacement])
-removes a sub-array from the array and replaces it with the elements of the replacement array and returns an array containing the removed elements


Jason
Jason is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:50 AM.


Advertisement
Log in to turn off these ads.