`
<?php while (next_album()): ?><table width="620" border="0" cellspacing="0" cellpadding="0" class="imagethumb_container">
<tr valign="top">
<td><?php set_context(ZP_IMAGE); $_zp_current_image = $_zp_current_album->getImage(0); if (!$_zp_current_image) continue; ?>
', 650, 685)"><?php printCustomAlbumThumbImage(null,null,185); ?>
<?php printAlbumTitle(); ?>
<?php set_context(ZP_ALBUM); ?></td>
<td><?php if (empty($_zp_albums)) {echo"";} else { ?> <?php next_album(); set_context(ZP_IMAGE); $_zp_current_image = $_zp_current_album->getImage(0); if (!$_zp_current_image) continue; ?>
', 650, 685)"><?php printCustomAlbumThumbImage(null,null,185); ?>
<?php printAlbumTitle(); ?>
<?php set_context(ZP_ALBUM); ?> <?php } ?> </td>
<td><?php if (empty($_zp_albums)) {echo"";} else { ?> <?php next_album(); set_context(ZP_IMAGE); $_zp_current_image = $_zp_current_album->getImage(0); if (!$_zp_current_image) continue; ?>
', 650, 685)"><?php printCustomAlbumThumbImage(null,null,185); ?>
<?php printAlbumTitle(); ?>
<?php set_context(ZP_ALBUM); ?> <?php } ?> </td>
</tr></table>
`
I changed `<?php if (next_album(false)) {echo"";} else { ?>` to `<?php if (empty($_zp_albums)) {echo"";} else { ?>` and it works. Now if I could only understand why it works

. The rows are now on tables. This stops the images on the next row below from being out of alignment.
Thank you both for your help.