【发布时间】:2014-08-11 02:36:33
【问题描述】:
有人可以帮我修复此代码吗?结果只出现1张图片..
function get_instagram($q,$client_id) {
$api = "https://api.instagram.com/v1/tags/".$q."/media/recent?client_id=".$client_id;
$response = get_curl($api);
$images = array();
if($response){
foreach(json_decode($response)->data as $item){
$src = $item->images->standard_resolution->url;
$thumb = $item->images->thumbnail->url;
$url = $item->link;
$images[] = array(
"src" => htmlspecialchars($src),
"thumb" => htmlspecialchars($thumb),
"url" => htmlspecialchars($url)
);
return "<a href='".$url."' target='_blank'><img src='".$thumb."' border='0'/></a>";
}
}
}
我想要实现的是让所有结果出现在一个页面中
【问题讨论】: