rendered paste body// gallery.php[...]for ($count = 0; $count >= 11; $count++) { $image[$count] = "$row[$c_B]+$count"; $size = getimagesize("$image[$count]"); $height[$count] = $size[1]; $width[$count] = $size[0]; if ($height[$count] > 100) { $height[$count] = 100; $percent[$count] = ($size[1] / $height[$count]); $width[$count] = ($size[0] / $percent[$count]); } else if ($width[$count] > 100) { $width[$count] = 100; $percent[$count] = ($size[0] / $width[$count]); $height[$count] = ($size[1] / $percent[$count]); } $smarty->assign('height[$count]', $height[$count]); $smarty->assign('width[$count]', $width[$count]); }[...]// gallery.tpl<img src="http://www.shuks.net/testing/comics/{$row.link}" width="{$width[1]}" height="{$height[1]}" border="0"><img src="http://www.shuks.net/testing/comics/{$row1.link}" width="{$width[2]}" height="{$height[2]}" border="0"><img src="http://www.shuks.net/testing/comics/{$row2.link}" width="{$width[3]}" height="{$height[3]}" border="0"><img src="http://www.shuks.net/testing/comics/{$row3.link}" width="{$width[4]}" height="{$height[4]}" border="0">