knowram Posted June 13, 2006 Share Posted June 13, 2006 Ok there must be some way to just take a given variable out of an array no mater where in that array the variable is. I have searched php.net for some time and can only find functions to split the array in two or take variables of the beginning or end of the array.thanks for the help Link to comment https://forums.phpfreaks.com/topic/11921-arrays/ Share on other sites More sharing options...
robos99 Posted June 13, 2006 Share Posted June 13, 2006 If you know the key for that slice of the array just do unset($array['key'])If you don't know the key you could get it through array_search.[code]$key=array_search($var,$array);unset($array[$key]);[/code] Link to comment https://forums.phpfreaks.com/topic/11921-arrays/#findComment-45233 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.