photos->photo as $photo) $photos[] = $photo;
if($photos)
{ shuffle($photos);
$total_photos = count($photos);
$n = 0;
while($n < 4 && $n < $total_photos)
{ $photo = $photos[$n];
$src =
"http://farm".utf8_decode($photo["farm"]).".static.flickr.com"
."/".utf8_decode($photo["server"])
."/".utf8_decode($photo["id"])
."_".utf8_decode($photo["secret"])
."_t.jpg";
$href =
"http://www.flickr.com/photos"
."/".utf8_decode($photo["owner"])
."/".utf8_decode($photo["id"]);
?>
data->img_size($src, 100, 100)) !== false)
{ $margin_top = floor((110 - $img_size["height"]) / 2);
}
else
{ $img_size = array
( "width" => "",
"height" => ""
);
$margin_top = 0;
}
?>
">
"
width="= $img_size["width"] ?>"
height="= $img_size["height"] ?>"
style="margin-top: = $margin_top ?>px;" />