Photos to appear in differnet colums

13 posts by 2 authors in: Forums > CMS Builder
Last Post: September 17, 2008   (RSS)

Re: [Dave] Photos to appear in differnet colums

By kitka - September 17, 2008

H Dave...

it still doesn't work...

I renamed the file to

http://www.rocaroalpacas.ca/males11b.php

just to try the change...

same result

I attached the file with the changes...
jim albert
Attachments:

males11b.php 7K

By Dave - September 17, 2008

Oh I see. You need two loops. One to display each record, and one to display each upload within the record:

<?php foreach ($malesRecords as $record): ?>
<table border="1" cellspacing="0" cellpadding="0"><tr>
<?php foreach ($record['mainphoto'] as $upload): ?>
<td> <a href="<?php echo $upload['urlPath'] ?>" target="_blank"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" border="0" /></a><br><br> </td>

<?php $maxCols=3; if (@++$count % $maxCols == 0): ?></tr><tr><?php endif; ?>

<?php endforeach ?>
</tr></table>
<?php endforeach ?>


If it still doesn't work feel free to send me FTP (by email to dave@interactivetools.com, don't post FTP to forum) and I'll take a look.
Dave Edis - Senior Developer
interactivetools.com