Mr Praveen G Siddavarapu
i suggest something like this (note, i forget mod off the top f my head,
so i'll just use %, so this might not be usable right off)
############# fake code start ############
my(@imgs, $xhtml, $row_size, $which);
$row_size = 4; # set the
number of pics per row
$which = 0; # set the
row marker
foreach $img (@imgs){ # for each
image
if (($which % $row_size) == 0 ){ $xhtml .= "</tr><tr>" ; } #
if the row ended start the next one
$xhtml .= "<td><img src=\"$img\" /></td>"; #
add a cell with the picture
$which++; #
increment the row marker
}
############ fake code end ###########
then to handle differing numbers you just check the row marker and finish
off the row later. this is more reusabl since the number of imagers toal
is irrelevant, and the number in a row ($row_size) is what you're
manipulating.
hope this helps ya
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs