northern-lights / html-tables-manager
[PHP] HTML 表格管理器(Tablesman 库)- 创建和自定义 HTML 表格
v2.1.2
2017-02-13 00:49 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2024-09-21 20:46:21 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