Re: Re: Removing a row from an Array

From: Date: Tue, 05 Jun 2007 05:48:42 +0000
Subject: Re: Re: Removing a row from an Array
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-256076@lists.php.net to get a copy of this message
I've never heard of, nor seen array_grep() before and AFAIK it's also not a built-in php function. Check it at http://www.php.net/array_grep, it doesn't exist. No need to advise that which does not exist :) - Tul Al wrote:
Can you be more specific? Show us a line of code, or so. There are lots of functions that may fit your needs, array_filter(), array_walk(), preg_grep(), etc. I've found array_grep() to be super in many cases. Returns the array consisting of the elements of the input array that match the given pattern. OR, that don't match the pattern. Most require array_values() to resync the keys. Ken Kixmoeller -- reply to ken@kixmoeller.com wrote:
On Jun 4, 2007, at 3:27 PM, Al wrote:
What determines the rows you want to keep?
User selection. The array is essentially a "shopping cart"-type of object.


« previous php.general (#256076) next »