Created
December 6, 2012 08:45
-
-
Save guitarmasaki/4222887 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 | |
//require("../debuglib.php"); | |
mb_internal_encoding("UTF-8"); | |
//取得元 | |
$url = "https://graph.facebook.com/207945416007551/photos"; | |
//取得したJSONを配列$objに格納 | |
$obj = json_decode(file_get_contents($url), true); | |
//表示するファイルサイズ | |
$size = "7"; | |
//さっきのとの違いは連想配列$val1にキーを複数指定しています。 | |
foreach($obj as $key => $value) { | |
foreach($value as $key => $val1) { | |
echo "<li><img src=\"".$val1["images"][$size]["source"]."\ alt=\"\" /></li>\n"; | |
} | |
} | |
//print_a($obj); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ありがとうございます。