View Full Version : substracting from arrays

05-16-2004, 07:50 AM
i was looking through the array functions in php.net and i saw NOTHING on deleting a value from an array, i must be wrong here but isn't that like one of the most common array functions people use?
how can it not be there. I had to write my own function which simply reconstructed the array with the bad value out. I know there's a better way to do this.

05-16-2004, 08:01 AM
check out the unset (http://us4.php.net/manual/en/function.unset.php) function in combination with the array_search (http://us4.php.net/manual/en/function.array-search.php) function.