Can someone help me fix this code? result only appear 1 picture..
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>";
}
}
}
What I'm trying to achieve is make all result appear in a page