maddhatter/markdown-table
最新稳定版本:1.4.0
Composer 安装命令:
composer require maddhatter/markdown-table
包简介
Dynamically generate markdown tables
README 文档
README
A small package to dynamically generate Markdown tables, as described here.
Install
Install using composer:
composer require maddhatter/markdown-table
Usage
// create instance of the table builder $tableBuilder = new \MaddHatter\MarkdownTable\Builder(); // add some data $tableBuilder ->headers(['Tables','Are','Cool']) //headers ->align(['L','C','R']) // set column alignment ->rows([ // add multiple rows at once ['col 1 is', 'left-aligned', '$1600'], ['col 2 is', 'centered', '$12'], ]) ->row(['col 3 is', 'right-aligned', '$1']); // add a single row // display the result echo $tableBuilder->render();
Result
| Tables | Are | Cool |
|----------|:-------------:|------:|
| col 1 is | left-aligned | $1600 |
| col 2 is | centered | $12 |
| col 3 is | right-aligned | $1 |
统计信息
- 总下载量: 113.56k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 25
- 点击次数: 1
- 依赖项目数: 11
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2017-06-01