本文整理汇总了PHP中HTML_Table::setAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML_Table::setAttributes方法的具体用法?PHP HTML_Table::setAttributes怎么用?PHP HTML_Table::setAttributes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML_Table
的用法示例。
在下文中一共展示了HTML_Table::setAttributes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
</nav>
<div class="container" role="main">
<h1>License server status overview</h1>
To get current usage for an individual server please click on the "Details" next to the server.
<div id="msg" style="visibility:hidden;"></div>
<?php
##########################################################################
# We are using PHP Pear library to create tables :-)
##########################################################################
require_once "HTML/Table.php";
# empty statusmsg
$statusMsg = "";
$tableStyle = array('cellpadding' => '1', 'cellspacing' => '2', 'class' => 'table table-striped');
# Create a new table object
$table = new HTML_Table();
$table->setAttributes($tableStyle);
$table->setColAttributes(1, "align=\"center\"");
# Define a table header
$headerStyle = "";
$colHeaders = array("License Server", "Description", "Status", "Current Usage", "Available features/license", "Master", "Version");
$table->addRow($colHeaders, $headerStyle, "TH");
# set width on description col
$table->setColAttributes(1, "width=\"180\"");
# grab all the different server types
foreach ($server as $host) {
$type[] = $host['type'];
}
# return only unique types
$types = array_unique($type);
# loop thru each unique type and make up status table
foreach ($types as $type) {