function flickr_feed ( $tag ) {
$f = new phpFlickr("MY API KEY", "MY API SECRET");
$tags = $f->photos_search(array("tags"=>$tag, "tag_mode"=>"any","per_page"=>"20"));
$counter="0";
foreach ($tags['photo'] as $photo) {
if($counter =="0" || $counter =="5" || $counter =="10" || $counter =="15") { $first = " first"; } else { $first = ""; }
echo '<div class="flickr-thumb'.$first.'">
<a rel="nofollow" target="_blank" href="http://farm'.$photo['farm'].'.static.flickr.com/'.$photo['server'].'/'.$photo['id'].'_'.$photo['secret'].'.jpg" title="'.$photo['title'].'">
<img src="http://farm'.$photo['farm'].'.static.flickr.com/'.$photo['server'].'/'.$photo['id'].'_'.$photo['secret'].'_s.jpg" alt="'.$photo['title'].'"></a>
</div>';
$counter++;
}
}