sorry, the example code from before was missing () around the if statement conditions, the corrcet sample code shouldbe:
<?php if($row_recordsetName['Photo1'] != "") { ?>
<td>
Photo1 display.....
</td>
<?php } ?>
<?php if($row_recordsetName['Photo2'] != "") { ?>
<td>
Photo2 display....
</td>
<?php } ?>
etc.....