【发布时间】:2014-11-28 06:30:17
【问题描述】:
我这里有代码,可以使用 curl 获取 json 数据。现在我想回显所有数据。这将不显示任何输出。
<?php
$json = file_get_contents('myurl');
$data = json_decode($json);
print_r($data);
?>
这是来自我的 url 的 json:
({"Response_Code":"0000","ResultMobilePrefix":["0917","0905","0906","0915","0916","0926","0927","0937","0935","0817","0936","0922","0923",
"0932","0933","0934","0942","0943","0907","0908","0909","0910","0912","0918","0919","0920","
0921","0928","0929","0930","0938","0939","0948","0949","0925","0989","0999","0947","0998","
0946","0975","0977"]});
【问题讨论】: