Reputation: 97
ive been trying for a while now trying to get a value from this std object
stdClass::__set_state(array(
'regions' =>
array (
0 =>
stdClass::__set_state(array(
'id' => 1,
'name' => 'Canada',
'image_url' => 'https://s3-us-west-2.amazonaws.com/staticimageskiind/flags/[email protected]',
)),
1 =>
stdClass::__set_state(array(
'id' => 2,
'name' => 'USA',
'image_url' => 'https://s3-us-west-2.amazonaws.com/staticimageskiind/flags/[email protected]',
)),
2 =>
stdClass::__set_state(array(
'id' => 3,
'name' => 'Global',
'image_url' => 'https://s3-us-west-2.amazonaws.com/staticimageskiind/flags/[email protected]',
)),
3 =>
stdClass::__set_state(array(
'id' => 4,
'name' => 'Australia',
'image_url' => 'https://s3-us-west-2.amazonaws.com/staticimageskiind/flags/[email protected]',
)),
),
'info' =>
stdClass::__set_state(array(
'code' => 'INFO_MARKETPLACE_RETRIEVED_REGIONS',
'name' => 'Marketplace Regions Retrieved',
'message' => 'A list of marketplace regions has been retrieved.',
)),
));
but i can't seem to get a value from this object, help would be appreciated, ive searched online but couldnt find out a solution
Upvotes: 1
Views: 1861
Reputation: 97
i have managed to get the correct output i wanted by
$abc = $result->regions;
echo $abc[1]->name;
hope this helps anyone in need
Upvotes: 0