我正在尝试从php
中的以下查询结果中读取 Name 值$queryResult=
QueryResult Object (
[records] => Array (
[0] => stdClass Object (
[Id] => [Account] => stdClass Object (
[Id] => [Name] => Smith Joyn Household
)
[Amount] => 150
)
)
)
我用于打印值的内容。
foreach ($queryResult->records as $record) {
echo $record->Amount; // prints 150
echo $record->Account->Name; // this doesn't
}
答案 0 :(得分:-1)
感谢大家的帮助。以下工作;
echo $ record-> Account-> Name;