以下のコードでは、生成された Div ID ラベルを取得し、それを下部の #inline div の配列番号に動的に挿入しようとしています。可能?
<?php if ($top_fundraisers && is_array($top_fundraisers)): ?>
<?php foreach ($top_fundraisers as $index => $fundraiser): ?>
<a href="#inline1" class="fancybox">
<div id="name<?php print htmlentities($index + 1); ?>">
<?php print htmlentities($fundraisers['member_name']); ?> *STORE THIS ID*
</div>
</a>
<?php endforeach;?>
<?php endif; ?>
<div id="inline1" display: none;">
<?php print htmlentities($top_fundraisers['name+number(generated above)'] ['member_name']); ?>*GENERATE STORED ID* HERE
</div>