jfarthing Posted December 21, 2007 Share Posted December 21, 2007 Whats the best way to remove a value from an array without knowing the index in PHP4.4 I have a function that works in 5.1 or higher but the server im using has 4.4 Quote Link to comment Share on other sites More sharing options...
jfarthing Posted December 21, 2007 Author Share Posted December 21, 2007 Nevermind, came up with my own: function array_remove($array, $value) { $arr = array_diff($array, $value); $arr = array_values($arr); return $arr; } 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.