Page 1 of 1

object array

Posted: Thu May 01, 2008 8:42 am
by puraskar
Hi Everyone ...

Hope everyone enjoying heading towards summer.

I've an array created by simplexml_load_file method which obviously store data in array of objects.

I want to delete some values(items) in array if a condition satisfy. and store the array in another array as object itself.

so, is there a way to delete one or more element in array of objects according to the condition supplied.

any clue will be appreciated.

thanks

Re: object array

Posted: Thu May 01, 2008 10:19 am
by Christopher
You can use unset() or array functions like array_slice() to delete elements of an array. See the section in the manual about arrays.