返回的结果如下:
["content"]=>
string(1624) "stdClass Object
(
[AddResult] => stdClass Object
(
[Code] =>
[Content] => stdClass Object
(
[MemberId] => 101525056
)
[ErrorMessage] =>
[Id] => 0
[Success] => 1
)
)
"
我想把结果中的 content内容($result['content']
)转成对象操作,但是用(object)$result['content']
操作后,结果如下 :
object(stdClass)#1 (1) {
["scalar"]=>
string(1624) "stdClass Object
(
[AddResult] => stdClass Object
(
[Code] =>
[Content] => stdClass Object
(
[MemberId] => 101525056
)
[ErrorMessage] =>
[Id] => 0
[Success] => 1
)
)
"
}
虽然有外围是对象了,但是scalar里面的内容还是字符串啊,
求解,到底怎样才能将它转成对象呢?
慕标5832272
慕沐林林
沧海一幻觉