
October 8th, 2003, 01:01 PM
|
 |
Contributing User
|
|
Join Date: May 2003
Location: Tennessee
Posts: 1,355
Time spent in forums: < 1 sec
Reputation Power: 12
|
|
Actually, the second isn't what you'd typically call an associative array, as it doesn't have text indices. At any rate, it does appear that you've got an array of objects and an array of strings. What you'll probably need to do is to iterate through the array of objects, and push onto a new array the result of a method that returns the folder attribute of the object. Then you can compare this array to the second array you list.
So you'd write a function in the stdClass that returns $this->folder. Then you'd do something like the following:
PHP Code:
$o=array();
foreach($objectArray as $obj){
array_push($o,$obj->get_folder());
}
Then you'd do an array_diff between $o and your second array listed below.
|