i have this piece of code:
<?
include( "http://api.flickr.com/services/feeds/photos_public.gne?id=22352410@N07&lang=en-us&format=php" );
$i = 0;
foreach($feed['items'] as $item) {
preg_match("/<img src=\"([^\"]+)\" .*? \/>/", $item['description'], $matches);
$img_html = $matches[0];
$img_src = $matches[1];
$medium_url = ereg_replace("_m", "_s", $img_src);
echo "$img_html";
}
?>
How I could make that each N number of pictures appear inside of a <div></div>
Example:
<div class="container">
<img src="1.jpg" />
<img src="2.jpg" />
<img src="3.jpg" />
<img src="4.jpg" />
<img src="5.jpg" />
<img src="6.jpg" />
<img src="7.jpg" />
<img src="8.jpg" />
<img src="9.jpg" />
<img src="10.jpg" />
<img src="11.jpg" />
<img src="12.jpg" />
</div>
<div class="container">
<img src="13.jpg" />
<img src="14.jpg" />
<img src="15.jpg" />
<img src="16.jpg" />
<img src="17.jpg" />
<img src="18.jpg" />
<img src="19.jpg" />
<img src="20.jpg" />
<img src="21.jpg" />
<img src="22.jpg" />
<img src="23.jpg" />
<img src="24.jpg" />
</div>
etc...
Any Ideas??
Thanks so much!!!