2013-06-11 17 views
-4

我找到了一個JSON文件,我想將它用於我的PHP網站,但是我之前從未見過JSON文件類型,所以我需要關於如何實現它的幫助。 JSON文件是(http://halocharts.com/2012/json_challenges.php)。我找到了一個我想在PHP中使用的JSON文件

+4

RTFM:http://php.net/manual/en/book.json.php –

+0

'json_decode(的file_get_contents( 「http://halocharts.com/2012/json_challenges.php」));' –

+0

可能重複[PHP的 - JSON數據分析](http://stackoverflow.com/questions/2067544/php-json-data-parsing) – mario

回答

1

試試這個:

<?php 

$raw=file_get_contents("http://halocharts.com/2012/json_challenges.php"); 
$raw=json_decode($raw,true); 

現在你可以用$raw['DailyChallenges']DailyChallenges訪問$raw

+0

謝謝你的答案工作! – user2472562

相關問題