xzero707/html-tables-manager

此包已被弃用且不再维护。作者建议使用 northern-lights/html-tables-manager 包。

[PHP] HTML 表格管理器(Tablesman 库) - 创建和自定义 HTML 表格

v2.1.2 2017-02-13 00:49 UTC

This package is auto-updated.

Last update: 2022-02-01 13:05:22 UTC


README

[PHP] HTML 表格管理器(Tablesman)

--

你像我一样讨厌 HTML 表格吗?对于这样一个小东西来说,太复杂,代码太多!所以我提出了一个想法和解决方案。一个 PHP 类,使得这个过程简单直接。

安装

composer require xzero707/html-tables-manager

或者克隆仓库并包含 tablesman.class.php

使用方法

基本用法(假设类已加载和初始化)

$table->setOption('class', 'example_table');
$table->setOption('id', 'example_table');
$table->setOption('CODE', "border='1'");
$table->create();
$table->header(array("Header #1", "Header #2", "Header #3"));
$table->row(array("Foo", "Bar", "Foobar"));
$table->row(array("Foo #2", "Bar #2", "Foobar #2"));
$table->footer(array("", "Foobar", ""));
$table->close();

echo implode("", $table->output); // Finaly flush output

更多详细信息和使用示例,请查看 [example.php](https://github.com/xZero707/PHP-Tables-Manager/blob/master/example.php)

许可协议

在此阅读: LICENSE