Bug #12129 Updated: array_remove()

From: Date: Fri, 13 Jul 2001 07:44:41 +0000
Subject: Bug #12129 Updated: array_remove()
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-59938@lists.php.net to get a copy of this message
ID: 12129 Updated by: zak Reported By: dmertens@zyprexia.com Old Status: Open Status: Bogus Bug Type: Feature/Change Request Operating System: Linux PHP Version: 4.0.6 New Comment: Thank you for the suggestion! However this functionality is already part of PHP. Use: unset ($array['key']); Previous Comments: ------------------------------------------------------------------------ [2001-07-13 03:21:58] dmertens@zyprexia.com I would like to see an function called array_remove(needle, haystack) with removes an item from an associative (or indexed) array. Currently i have a workaround which loops the array. During the loop a new array is created. When the loop finds the item which has to be removed, it skip the current item. After the loop, the new array is returned. A function like this would complete the array functions. Dave Mertens dmertens@zyprexia.com ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12129&edit=1

« previous php.dev (#59938) next »