Yes I added that to the second counter.. but when I do that.. the first counter doesn't count... just displays all ones.. and the second counter just displays all twos.
Keep in mind also... the reason for this counter is specifically in order to call up the javascript collapse effect in the head. seen here: http://www.recamerica.com/REC/featuredListings2.php
<?php $counter = 0; ?>
<?php foreach ($featured_listingsRecords as $record): ?>
<div id="listing" class="clienteditor">
<div id="listing-town" ><a href="javascript:animatedcollapse.toggle('listing-body-<?php $counter++; ?><?php echo $counter; ?>')">
<div id="city-state"><?php echo $record['title'] ?></div>
<div id="price"><?php echo $record['price'] ?></div>
</a></div>
<div id="listing-body-<?php $counter = 0; ?><?php $counter++; ?><?php echo $counter; ?>">
<?php foreach ($record['photo'] as $upload): ?>
<div id="listing-photo"><a href="<?php echo $record['website_link'] ?>" target="_blank"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt='' border="0"/><br/>
<?php endforeach ?></a></div>
</div>
</div>
<?php endforeach; ?>
And the result must look like this:
<a href="javascript:animatedcollapse.toggle('listing-body-1')">
<div id="listing-body-1"></div>
<a href="javascript:animatedcollapse.toggle('listing-body-2')">
<div id="listing-body-2"></div>
etc...
Also.. view this URL to see how this should work in the end.. except this one works because I RIGGED the numbers manually.. (no good because I need to be able to mix up the listings often using the sort order). http://www.recamerica.com/REC/featuredListings.php
John Tedesco
Creative Director
JAM Graphics