Re: Filtering arrays based on an object attribute
- From: OmegaJunior <omegajunior@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 27 Feb 2007 23:40:43 +0100
On Tue, 27 Feb 2007 23:23:14 +0100, laredotornado@xxxxxxxxxxx <laredotornado@xxxxxxxxxxx> wrote:
Hi,
I have an array filled with a particular type of object, which
contains an attribute "m_level", of integer type. What I want is to
get a subset of the array whose "m_level" attribute is equal to zero.
Is there a short way I can do this other than iterating through a
foreach / for loop?
I'm using PHP 4.4.4.
Thanks, - Dave
Did you try the array_filter() function?
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
.
- References:
- Filtering arrays based on an object attribute
- From: laredotornado@xxxxxxxxxxx
- Filtering arrays based on an object attribute
- Prev by Date: Re: photo gallery question
- Next by Date: Re: mhash functions for my windows apache development server
- Previous by thread: Filtering arrays based on an object attribute
- Next by thread: Re: Filtering arrays based on an object attribute
- Index(es):
Relevant Pages
|