我如何遍历这个对象并阅读conversion_id
. 我尝试了以下foreach,但我似乎做错了。
<?php
foreach( $result->response->data as $key=>$value ) {
echo $value->Stat->conversion_id.' ';
}
?>
stdClass Object
(
[response] => stdClass Object
(
[status] => 1
[data] => stdClass Object
(
[data] => Array
(
[0] => stdClass Object
(
[Stat] => stdClass Object
(
[conversion_id] => 351140
)
)
[1] => stdClass Object
(
[Stat] => stdClass Object
(
[conversion_id] => 355704
)
}
)
)
)
)