I'm using TBS sample code:
include_once('tbs_class.php');
$TBS = new clsTinyButStrong;
$TBS->LoadTemplate('template.htm');
$list = array('X','Y','Z');
$TBS->MergeBlock('blk', $list);
$TBS->Show();
but instead of a one column table as below
<table>
<tr><td>X</td></tr>
<tr><td>Y</td></tr>
<tr><td>Z</td></tr>
</table>
I want to get a multicolumn (for instance 4 column) table.
So far the only working code I found is:
$number_of_columns = 4;
$number_of_rows = 2;
$number_of_items = $number_of_columns * $number_of_rows;
$output_data = array('1', '2', '3', '4', '5', '6', '7', '8');
$TBS->MergeBlock('col','num',$number_of_columns); // expand columns
$TBS->MergeBlock('od',array_slice($output_data,0,$number_of_items));
and as template
<table border="1">
<tr>[od;block=tr;serial]<td>[od_[col.val;block=td].val;block=td]</td></tr>
</table>
Is there anything simpler?