How would I go about gett my code below to out 5 .choice elements in a .row element
<?php
$count = 0;
foreach($imp_photos['data'] as $photo)
{
$count = ($count + 1)%5;
if ($count == 0) {
?>
<div class="choice">
<input type="checkbox" name="photos[]" value="<?php echo $photo->id; ?>" class="fb_checkbox"><img src="<?php echo $photo->picture; ?>" class="clear" />
</div>
<?php
}
else
{
?>
<div class="choice">
<input type="checkbox" name="photos[]" value="<?php echo $photo->id; ?>" class="fb_checkbox"><img src="<?php echo $photo->picture; ?>" class="clear" />
</div>
<?php
}
}
?>
I know I have to do some with % but I cannot get it working.
Untested, but should do the trick