0

how does one decode a JSON to an html list, and be able to dumb it into a 'div' or DOM element, or am I missing something?

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. 
)

1 Answers1

2

wherever your are decoding json in php, instead of that Use

json_decode($json,true)

It will return associative array that you can use in html easily.

Nishu Tayal
  • 20,106
  • 8
  • 49
  • 101