Re: Objects and Traversing

From: Date: Wed, 04 Jun 2008 23:22:31 +0000
Subject: Re: Objects and Traversing
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-275035@lists.php.net to get a copy of this message
VamVan wrote:
Hello Guys, Here is the object. How can I get access to the [Name] = access. People who help me with this can you please tell me what is the logic behind traversing the objects and how do you gather the values. Thanks. I am looking for an answer like this $queryResult->f....->dsfsdf QueryResult Object (
    [queryLocator] =>
    [done] => 1
    [records] => Array
        (
            [0] => SObject Object
                (
                    [type] => Contact
                    [fields] =>
                    [sobjects] => Array
                        (
                            [0] => SObject Object
                                (
                                    [type] => Account
                                    [fields] => SimpleXMLElement Object
                                        (
                                            [Name] => Access
                                        )
                                )
                        )
                )
        )
    [size] => 1
)
Simply this would give you name $QueryResult->records[0]->sobjects[0]->fields->Name -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare

« previous php.general (#275035) next »