我有这种情况:
object(stdClass)#203 (1) {
["1"]=>
object(stdClass)#212 (7) {
["user_id"]=>
int(1)
["type"]=>
string(6) "Device"
["name_first"]=>
string(0) ""
["name_last"]=>
string(0) ""
["name_display"]=>
string(0) ""
["gender"]=>
string(11) "Unspecified"
["birthday"]=>
string(0) ""
}
}
我想访问“user_id”或[“1”],但这是stdclass类型,所以我不能像数组一样对待它。(注:来自json_decode
)