I am getting the following array of objects as response when printing a variable called $userStatistic
.
OnApp_User_BillingStatistics Object
(
[_tagRoot] => vm_stat
[_resource] => vm_stats
[fields:protected] =>
[dynamicFields:protected] => Array
(
[] => stdClass Object
(
[created_at] => 2012-11-01T00:00:22Z
[currency_code] => AUD
[id] => 1459
How can I parse through this and get the value of created_at
and the other things.? I have tried to use $userStatistic->created_a
t. But it is not returning anything. Then I tried with $userStatistic[0]->created_at
. But it is throwing Fatal error as
Fatal error: Cannot use object of type OnApp_User_BillingStatistics as array
How can I parse through this mixed variable ??
NB : For the other responses which don't have this square brackets after Array in dynamicFieldsm
, I am able to access data using $userStatistic->created_at