how to get data to javascript from php using json_encode?

后端 未结 7 2040
梦如初夏
梦如初夏 2020-12-29 12:20

I am trying to map traceroutes to google maps.

I have an array in php with traceroute data as

$c=ip,latitude,longitude, 2nd ip, its latitude, longitu         


        
7条回答
  •  礼貌的吻别
    2020-12-29 12:53

    we have to display the json encode format in javascript , by using below one:

    var responseNew = JSON.parse(' {"name" : "John"} ' );
    alert(responseNew['name']);
    

提交回复
热议问题