--TEST-- 28.phpt: thead, tfoot, tbody with array functionality of setCellContents() --FILE-- getHeader(); $tfoot =& $table->getFooter(); $tbody =& $table->getBody(); $thead->setAutoFill('foo'); $tfoot->setAutoFill('bar'); $table->setAutoFill('[empty]'); $data = array(1 => 'row1', 'row2', 'row3'); foreach($data as $key => $value) { $thead->setCellContents($key, 0, $value); $tfoot->setCellContents($key, 1, $value); $tbody->setCellContents($key, 2, $value); } // output echo $table->toHTML(); ?> --EXPECT--
foo | foo | foo |
row1 | foo | foo |
row2 | foo | foo |
row3 | foo | foo |
bar | bar | bar |
bar | row1 | bar |
bar | row2 | bar |
bar | row3 | bar |
[empty] | [empty] | [empty] |
[empty] | [empty] | row1 |
[empty] | [empty] | row2 |
[empty] | [empty] | row3 |