Thanks Sisom for your suggestion but this won't work
Code:
{ if %cat_num.3 }
</tr>
{/if}
I had another little play around and ended up using the code below. I don't know how or why it works but it does and so now i've got XHTML validated product pages. This code works on the assumption that you've got three thumnails across and no more than 12 related items. If you wanted to have more than 12 I guess you could just add an extra $smarty.section.cat_num.index eq 11.
Code:
</td>
{if $smarty.section.cat_num.index eq 2 || $smarty.section.cat_num.index eq 5 || $smarty.section.cat_num.index eq 8 || %cat_num.last% }
</tr>
{/if}
{/section}
</table>
{/capture}
I just love it when you've got absolutely no idea how or why something works but it does anyway.
If you want to have a look at it in action see here:
http://www.ausgardener.com.au/Diamond-Night-pr-762.html