Web Hosting Talk







View Full Version : foreach w/2 colomn table


siforek
03-31-2007, 05:54 AM
I watched someone do this once, but can't seem to goole it up when I need it the most. If the title soesn't say it all..

I have an array containing 4 values. Currently the output is like this:

<table>
<tr>
<td>1</td>
</tr>
<tr>
<td>2</td>
</tr>
<tr>
<td>3</td>
</tr>
<tr>
<td>4</td>
</tr>
</table>

That is of course easy, but I'd like it to be like this:

<table>
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
</tr>
</table>

BTW, I'm using smarty. Thanks in advance!

siforek
03-31-2007, 08:09 AM
I got my answer here: http://smarty.incutio.com/?page=table_foreach