Q:

Print stdClass object from sub array in php

Can someone please help me 
var_export($result); output is 
array (
  'ResponseCode' => '1',
  'ResponseText' => 'OK',
  'data' => 
  array (
    0 => 
    stdClass::__set_state(array(
       'Credit' => '$1.9',
    )),
  ),
)

How can I just echo or print Credit value here .   I tried print_r($result['data'] [0]);  but i am getting output as  
stdClass Object
(
    [Credit] => $1.9
)

A:

You have to use it as following
$credit = $result['data'][0]->Credit;

