RE: Table creating function?
| From: | Peter Bowyer | Date: | Sun, 04 Nov 2001 08:04:23 +0000 |
| Subject: | RE: Table creating function? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1830@lists.php.net to get a copy of this message | ||
At 11:20 AM 11/3/01 -0600, you wrote:
{* #columns# is the number of columns you want *}
<TABLE border=1>
<TR>
{section name=numloop loop=$data}
<TD>{$data[numloop]}</TD>
{* see if we should go to the next row *}
{if not (%numloop.rownum% mod #columns#)}
</TR>
{* don't start a new row on the last loop *}
{if not %numloop.last%}<TR>{/if}
^^^^^
Just to be awkward, is there any way we could get this <tr> to be the top one just outside the section tag? This would make it much easier if someone wanted to do the alternating coloured rows thingummy.
Thanks,
Peter.
{/if}
{/section}
</TR>
</TABLE>
--oOo--
Narrow Gauge on the web - photos, directory and forums!
http://www.narrow-gauge.co.uk
--oOo--
Peter's web page - Scottish narrow gauge in 009
http://members.aol.com/reywob/
--oOo--