Getting data from a object named $type

时间:2015-06-26 10:19:02

标签: php arrays object

I have this in response from a webservice

stdClass Object (
    [$type] => Model.Result[[System.Int32, mscorlib]], Model
    [success] => 1
    [errorMessage] =>
    [result] => 1
    [statusCode] => 200
) 

and i have tried $response->{"$type"}['success'] and $response->{"$type"}->success and failed - i can loop through the object and get the value, but it should be possible to get i directly.

0 个答案:

没有答案