I have a php page that produces an array of elements. For the sake of simplicity let's say that it contains the numbers 1-5 in numerical order. These numbers need to be equally (or as close to equal as possible) split into two columns (using a html table) like so:
1 4
2 5
3
The number of columns might change in the future. Since this is a change on the presentation level I assume that it should be something that can be achieved by making changes exclusively in the template file. Which suggests to me that it's Smarty that should handle the division of elements into columns.
Is there a way to achieve this with Smarty (and how) or should I let the php file do all the work?