In the code below, I am trying to get the generated Div ID label and insert it dynamically into the array number in the #inline div at the bottom. possible?
<?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>
Keep an IDs array – use the IDs as key and store the member names while in the foreach loop.
Then use foreach with this array.