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 Quote Link to comment 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] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.