Jump to content

PHP OBJECT and RETURN ITEMS FROM INSIDE OBJECT


jasonabuck

Recommended Posts

$queryResult = new QueryResult($response);

 

$objContacts = (object)$queryResult;

 

echo '<pre>'.print_r($objContacts, true).'</pre>';

How do I echo the indivdual keys.  For example, how do I get the LastName to echo.

 

QueryResult Object

(

    [queryLocator] =>

    [done] => 1

    [records] => Array

        (

            [0] => SObject Object

                (

                    [type] => Contact

                    [fields] => stdClass Object

                        (

                            [LastName] => Buck

                            [FirstName] => Jason

=> [email protected]

                        )

 

                    [id] => 0035000000QgtjRAAR

                )

 

        )

 

    => 1

)

 

// for some reason the post is moving infront of the =>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.