この例は、属性文字列 id="header" を thead タグに追加するものです。 他のふたつのタグについても同じ手順で追加できます。
$table = new HTML_Table();
// [...]
$thead =& $table->getHeader();
$thead->setAttributes(array('id' => 'header'));
// [...]
$table->display(); |
この例の結果は次のようになります。
<table>
<thead id="header">
[...]
</thead>
[...]
</table> |