
ross
Staff
/ Moderator

Apr 27, 2009, 2:34 PM
Post #2 of 2
(1067 views)
Shortcut
|
|
Re: [millertrey] 2 Challenges with displaying listings....
[In reply to]
|
Can't Post
|
|
Hi there. Thanks for posting this to the forum :). I think the best way to get this all done is one at a time so lets start with the 3 x 3 column. The first step there is to get it displaying the default way (one single column). but using all your formatting and everything. So basically, pretend that you only want to have one column of listings for now. Once you get that going, check out this code:
<table> <?php foreach ($parent_categoriesRecords as $record): ?> <td> display something here </td> <?php $maxCols=3; if (@++$count % $maxCols == 0): ?> </tr> <tr> <?php endif ?> <?php endforeach ?> </table> What I've done there is put a <table> around the whole foreach loop and it loads each record into a table cell (td). Then there is that little maxCols=3 part which checks when you need to create a new table row. Does that make sense? Let me know what you think :). ----------------------------------------------------------- Cheers, Ross Fairbairn - Product Specialist support@interactivetools.com Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting: http://www.interactivetools.com/consulting/
|