| Abdul-Wahid Paterson 2005-01-11, 4:00 pm |
| Hi,
Ok, I came up with this solution which works fine for me. Thanks to
all who gave help with this and the array counting part.
I basically have an array called $data and a $numcols,....That in my
case my users are defining within their template.
Here is my template...cut down a bit to simplifiy the example
<table>
{math equation="count/$numcols" count=$data|@count assign=length}
{section name=data1 loop=$data step=$numcols}
<tr>
{section name=data2 loop=$data step=$length
start=$smarty.section.data1.iteration}
<td><a href="sompage.php?data={$data[data2].foo|urlencode}">{$data[data2].bar}</a></td>
{/section}
</tr>
{/section}
</table>
In this why the PHP can generate one array of $data. The template can
decide whether to display it in a conventional row by row or this
column by column data. All with no extra stuff set on the PHP side.
Regards,
Abdul-Wahid
|