ok, there needs to be 2 repeat regions, one around the tab LI elements and another around the tab content div.
here is a simplistic dynamic tab panels example i created:
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<?php do { ?>
<li class="TabbedPanelsTab" tabindex="0"><?php echo $row_recordsetName['columnName']; ?></li>
<?php } while ($row_recordsetName = mysql_fetch_assoc($recordsetName)); ?>
</ul>
<div class="TabbedPanelsContentGroup">
<?php
mysql_data_seek($recordsetName, 0);
$row_recordsetName = mysql_fetch_assoc($recordsetName);
?>
<?php do { ?>
<div class="TabbedPanelsContent"><?php echo $row_recordsetName['columnName']; ?></div>
<?php } while ($row_recordsetName = mysql_fetch_assoc($recordsetName)); ?>
</div>
</div>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
</script>
note that before the second repeat region, i reset the recordset using this code:
<?php
mysql_data_seek($recordsetName, 0);
$row_recordsetName = mysql_fetch_assoc($recordsetName);
?>