HTML_Table::setColGroup -- Set a colgroup
Описание
Allows to add a colgroup (with attributes)
Параметр
mixed $colgroup -
Empty string, string with attributes or an associative array of
attributes for the columns
mixed $attributes -
Associative array or string of colgroup attributes
Пример
Пример 42-1. Usage without a col tag <?php
require_once 'HTML/Table.php';
$table =& new HTML_Table();
$colgroup = '';
$attributes = 'span="3" class="group1"';
$table->setColGroup($colgroup, $attributes);
?> |
|
Пример 42-2. Usage with col tags <?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);
?> |
|
Пример 42-3. Usage with multiple colgroups <?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);
?> |
|
Заметка
Эта функция не должна вызываться статически.
HIVE: All information for read only. Please respect copyright! |
|