数组 - 迅搜产出包含特殊object的array转化成一般PHP array
黄舟
黄舟 2017-04-10 14:59:20
0
0
274

刚在用迅搜,产出了一个结果array A,里面包含了迅搜的特殊object,无法直接用于显示输出。怎样能把它转化成包含普通object的一般array B呢?

谢谢!

Array A:

Array ( [0] => XSDocument Object ( [_data:XSDocument:private] => Array ( [id] => 65 [message] => cool book awesome [username] => lost guy [book] => my love....
[1] => XSDocument Object ( [_data:XSDocument:private] => Array ( [id] => 78 [message] => cool book awesome [username] => lost guy [book] => my love....)

我想得到的Array B 模样:

Array ( [0] => StdClass Object ( Array ( [id] => 65 [message] => cool book awesome [username] => lost guy [book] => my love....
[1] => StdClass Object ( Array ( [id] => 78 [message] => cool book awesome [username] => lost guy [book] => my love....)

谢谢!Thanks a lot!

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

Antworte allen(0)
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!