...

View Full Version : substracting from arrays



o0katz0o
05-16-2004, 06: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.

dswimboy
05-16-2004, 07: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum