void HTML_Table::setColGroup (
mixed $colgroup
= = null
,
mixed $attributes
= = null
)
colgroup (と、その属性) を追加します。
mixed $colgroup
-
空の文字列、列の属性を表す文字列、あるいは列の属性の連想配列。
mixed $attributes
-
colgroup の属性を表す連想配列あるいは文字列。
col タグを使用しない例
<?php
require_once 'HTML/Table.php';
$table =& new HTML_Table();
$colgroup = '';
$attributes = 'span="3" class="group1"';
$table->setColGroup($colgroup, $attributes);
?>
col タグを使用する例
<?php
require_once 'HTML/Table.php';
$table =& new HTML_Table();
$colgroup = array('style="font-size: 120%;"', 'class="col2"', 'align="right"');
$attributes = 'span="3" class="group1"';
$table->setColGroup($colgroup, $attributes);
?>
複数の colgroup を使用する例
<?php
require_once 'HTML/Table.php';
$colgroup = array('style="font-size:120%;"', 'class="col2"', 'align="right"');
$attributes = 'span="3" class="group1"';
$table->setColGroup($colgroup, $attributes);
$colgroup = array(array('class' => 'col4'), array('class' => 'col5'));
$attributes = 'span="2" class="group2"';
$table->setColGroup($colgroup, $attributes);
?>
This function can not be called statically.