Jump to content

Array Manipulation Help


rabadaba

Recommended Posts

I am a newbie at php.  Is there a function that will let me delete an element of an array?

 

Lets say I have an array:  array1("AAA","BBB","CCC","DDD","EEE","FFF")  Note that the array will not have multiple elements with the same content.

 

Then lets say get a response from the user that selected :    "CCC"

 

I want to delete that content out of the array  - thus the resultant array should be :  array1("AAA","BBB","DDD","EEE","FFF")

 

or if the user selected "AAA" the result should be: array1("BBB","CCC","DDD","EEE","FFF")  (assuming the user did not select "CCC" first)

 

 

Link to comment
https://forums.phpfreaks.com/topic/99296-array-manipulation-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.