【发布时间】:2013-05-07 04:44:28
【问题描述】:
我正在尝试使用 PHP 的 foreach() 循环从 Reddit JSON API 中提取标题和 URL。 Here is what the JSON outputs when used in print_r.
这是我目前的代码...
$string_reddit = file_get_contents("http://reddit.com/hot.json");
$json = json_decode($string_reddit, true);
【问题讨论】: