将 JSON 结果 stdClass Object() 解码为格式化的 HTML


Decode JSON result stdClass Object() to a formatted HTML

如何将JSON解码为html列表,并能够将其简化为"div"或DOM元素,还是我错过了什么?

stdClass Object ( 
[msc] => 26771010150 
[number] => 2677410930 
[status] => OK 
[msc_mcc] => 652 
[imsi] => 652010151221139 
[mcc] => 652 
[operator_country] => Botswana 
[msc_operator_name] => Mascom Wireless (Pty) Ltd. 
[msc_operator_country] => Botswana 
[msc_mnc] => 01 [mnc] => 01 
[id] => 928692391 
[msc_location] => 
[operator_name] => Mascom Wireless (Pty) Ltd. 
)
无论您

在PHP中解码json,而不是使用

json_decode($json,true)

它将返回您可以在 html 中轻松使用的关联数组。