I get a returned result from an API in stdClass format. I don't know anything about this type of data. So here it looks like:
object(stdClass)#41 (1) {
["return"]=>
object(stdClass)#42 (7) {
["afterPayOrderReference"]=> string(32) "d4ab78df6ab2ef84194dd1c1d66240b8"
["checksum"]=> string(32) "4f8826a99e9c0a67e578d04b6a625117"
["resultId"]=> int(0)
["statusCode"]=> string(1) "A"
["timestampIn"]=> float(1408533108515)
["timestampOut"]=> float(1408533113616)
["transactionId"]=> int(129525)
}
}
What I need is retrieving the statusCode value. I tried doing like in a post I read:
$array = (array) $stringResult;
$array[0]->statusCode;
But it didn't work. Please, someone explain to me in the simplest way because it's really new to me. Thanks.