【发布时间】:2013-09-23 15:56:46
【问题描述】:
我有这个代码:
<?php
$jsonurl = "http://api.wipmania.com/json";
$jsonfgc = file_get_contents($jsonurl);
$json = json_decode($jsonfgc, true);
foreach ( $json["address"] as $address => $country_code )
{
echo $address["country_code"];
}
?>
但是,当我打印出来时,我只得到“cccccr”。我只尝试echoing $country_code,但我得到“North AmericaNA-United StatesUS-”。有什么帮助吗?
【问题讨论】:
标签: php file-get-contents json