you have the repeat around the cells for the row:
<tr class="borderRow">
<?php
while(!$foreignMembers_i->atEnd()) {
?>
<td><?php echo($foreignMembers_i->getColumnVal("lastname")); ?>, <?php echo($foreignMembers_i->getColumnVal("firstname")); ?></td>
<td align="center"><?php echo($foreignMembers_i->getColumnVal("country")); ?></td>
<?php
$foreignMembers_i->moveNext();
}
?>
</tr>
it should be around the row
<?php
while(!$foreignMembers_i->atEnd()) {
?>
<tr class="borderRow">
<td><?php echo($foreignMembers_i->getColumnVal("lastname")); ?>, <?php echo($foreignMembers_i->getColumnVal("firstname")); ?></td>
<td align="center"><?php echo($foreignMembers_i->getColumnVal("country")); ?></td>
</tr>
<?php
$foreignMembers_i->moveNext();
}
?>
when applying the repeat, make sure you select the TR tag in the tag selector.