Created
December 6, 2012 04:27
-
-
Save guitarmasaki/4221769 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//取得元 | |
$url = "https://graph.facebook.com/207945416007551/photos"; | |
//取得したJSONを配列$objに格納 | |
$obj = json_decode(file_get_contents($url), true); | |
//$objは多元連想配列なのでループを2重に回して$val1配列に入れる | |
foreach($obj as $key => $value) { | |
foreach($value as $key => $val1) { | |
echo "<li><img src=\"".$val1["source"]."\" alt=\"\" /></li>\n"; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment