Re: [PHP] Re: Removing a row from an Array

2007-06-05 Thread Al
I miss keyed, it's preg_grep(). Had "array" on my mind. M. Sokolewicz wrote: 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 A

Re: [PHP] Re: Removing a row from an Array

2007-06-04 Thread M. Sokolewicz
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 lo

Re: [PHP] Re: Removing a row from an Array

2007-06-04 Thread Al
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

Re: [PHP] Re: Removing a row from an Array

2007-06-04 Thread Ken Kixmoeller -- reply to [EMAIL PROTECTED]
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. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Removing a row from an Array

2007-06-04 Thread Al
What determines the rows you want to keep? Ken Kixmoeller -- reply to [EMAIL PROTECTED] wrote: Hey - - - - - - -- To do this, I am: - looping through the array - copying the rows that I want to *keep* to a temp array, and - replacing the original array with the "temp' one. Seems convoluted

[PHP] Re: Removing a row from an Array

2007-06-04 Thread Roberto Mansfield
Can't you just unset() the values you don't want? Ken Kixmoeller -- reply to [EMAIL PROTECTED] wrote: > Hey - - - - - - -- > > To do this, I am: > > - looping through the array > - copying the rows that I want to *keep* to a temp array, and > - replacing the original array with the "temp' one