Re: [proweb] Displaying in rows of 2 Is this possible?
Hi David,
Ok, yes, you can do that.
The first step is to create a mockup of how you want it to look.
Next, there are a few ways to do it. A pure CSS way is to put each "entry" in a div and left float them inside a larger container.
A PHP way is to create a table, keep track of which "entry" we're on and insert a closing/opening row tag every 3 rows - like this: (replace $yourRecords and title with the names from your viewer code).
<table border="1">
<?php foreach ($yourRecords as $record): ?>
<td><?php echo $record['title'] ?></td>
<?php $maxCols=3; if (@++$count % $maxCols == 0): ?>
</tr><tr>
<?php endif; ?>
<?php endforeach; ?>
</table>
If you're not sure where to begin start with the mockup of how you want it to look. And feel free to post any questions back to this thread.
Hope that helps.
Dave Edis - Senior Developer
interactivetools.com