It looks like you need a <? or <?php tag. Like this:
Code:
<!--bof Additional Product Images -->
<?php
xt' => "\n " . $link);
$col ++;
if ($col > (IMAGES_AUTO_ADDED -1)) {
$col = 0;
$row ++;
}
} // end for loop
} // endif

?> <!--eof Additional Product Images -->