Need help in isolating specific value in an object using vardump?



I'm having difficulty isolating a particular value within an object in
my code, and I'm wondering if there is some approach using vardump()
where I can isolate a particular name/value pair?

Seems brute force, but I've tried a number of other approaches with no
luck

For example if I var_dump($queryResult), I get an output that looks
like this:

array(4) { ["done"]=> string(4) "true" ["queryLocator"]=> NULL
["records"]=> &object(sobject)(4) { ["type"]=> string(7)
"Contact" ["id"]=> string(18) "0035000000QAXiNAAX" ["values"]=>
array(3) { ["FirstName"]=> string(10) "Chuck Test" ["LastName"]=>
string(18) "Wyatt Contact Test" ["AccountId"]=> string(18)
"0013000000AObDPAA1" } ["fieldsToNull"]=> NULL } ["size"]=>
string(1) "1" }

I'm trying to isolate string 18 (AccountId) and assign it to a
variable.

If I loop through the object queryResult... I don't get any output
other than Object/1.

$arr = $queryResult;
reset($arr);
while (list(, $value) = each($arr)) {
echo "Value: $value<br />\n";
}


Thank you for any suggestions!

-Chuck

.



Relevant Pages

  • Re: Need help in isolating specific value in an object using vardump?
    ... and I'm wondering if there is some approach using vardump() ... where I can isolate a particular name/value pair? ... Seems brute force, but I've tried a number of other approaches with no ... If I loop through the object queryResult... ...
    (php.general)
  • Re: break Causes Execution of Procedure?
    ... >the loop as opposed to outside of the loop. ... >tells me that I just covered up a bug as opposed to removing it. ... isolate the specific problem. ... def ProcessCycleMap(cycleMap, keys, skipList): ...
    (comp.lang.python)
  • Re: Use a variable value in another variables name
    ... > I have a while loop which matches every table in my document and I want to ... use strict; ... either because that will mess everything up. ... > I've messed around using to isolate each variable, ...
    (comp.lang.perl.misc)
  • print pdfs with changing filenames in a macro
    ... I have created a macro to isolate certain data based on a variable ... I would like to print the data to a pdf file. ... following code in a k loop works to make fn$ the filename I desire; ...
    (microsoft.public.excel.programming)
  • Create a matrix with a colors coordinates..
    ... I want to isolate the pixels from an image that correspond to a specific color,ie i want to call a function inside a loop whenever a specific color is met. ...
    (comp.soft-sys.matlab)