Need help in isolating specific value in an object using vardump?
- From: Chuck W1CEW <cewyattjr@xxxxxxxxx>
- Date: Sat, 30 Jun 2007 15:15:45 -0000
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
.
- Prev by Date: Date Calculation Help
- Next by Date: MySQL and aes_crypt
- Previous by thread: Date Calculation Help
- Next by thread: MySQL and aes_crypt
- Index(es):
Relevant Pages
|