What's the best way to output data into rows and columns? I need 4 columns, and however many rows it takes to display all the data. So if there are 9 results, there will be 3 rows - first and second rows show 4 results and the last row shows the last result.
Here is an example:
table data:
id | letter
1 | a
2 | b
3 | c
4 | d
5 | e
6 | f
7 | g
8 | h
9 | i
desired output:
a b c d
e f g h
i
What's the best way to do this? Thanks in advance.