rabadaba Posted April 3, 2008 Share Posted April 3, 2008 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 More sharing options...
michaelh613 Posted April 3, 2008 Share Posted April 3, 2008 See http://www.phpf1.com/tutorial/php-array.html?page=6 You may want to read the entire array tutorial http://www.phpf1.com/tutorial/php-array.html Also learn about unset() at http://us3.php.net/unset Link to comment https://forums.phpfreaks.com/topic/99296-array-manipulation-help/#findComment-508070 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.