I am trying to get a results of listing posted in four columns... as shown on the link below
Here is a sample page of the listings as working
http://www.genedeco.com/newsite/listings.php
I am using Foundation 12 column grid system...
The problem i get is when i shuffle listings around ie sort order get gap spacing.
ie some orws have all four listings across and some 3 or 4 then a row with two then four etc....
The code i am using is as follows...
Can someone see if perhaps i am doing something wrong in my code to get this erractic results..
I am thinking it has to do with the line
<?php $maxCols=4; if (@++$count % $maxCols == 6): ?></div><?php endif; ?> or soemthing like that.
Here is the code...
<div class="row">
<div class="twelve columns">
<font size="+1"color="#660000"><strong>Our Newest Additions...<hr></strong></font>
<?php foreach ($listingsRecords as $record): ?>
<?php foreach ($record['main_image'] as $index => $upload): ?>
<div class="three columns"><font face="Arial,Helvetica,sans-serif" size="-1">Location: <strong><?php echo $record['content'] ?></strong></font><br/><br>
<a href="<?php echo $record['_link'] ?>"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" border="0" /></a><br><br>
<font face="Arial,Helvetica,sans-serif" size="-1"><?php echo $record['property_type:label'] ?><br><strong>$<?php echo htmlencode($record['price']) ?> <?php echo $record['per:label'] ?> <br><?php echo $record['utilities:label'] ?></strong><br><?php echo $record['rental_status:label'] ?> <?php echo $record['occupancy_date:label'] ?> <?php echo $record['occupany_date_day:label'] ?></font><br/><br><br><br></div>
<?php $maxCols=4; if (@++$count % $maxCols == 6): ?></div><?php endif; ?>
<?php endforeach ?>
<?php endforeach ?>
<?php if (!$listingsRecords): ?>
<strong>Sorry we have nothing matching your description at this time</strong><br/><br/>
<?php endif ?>
</div>
jim albert