marcin-orlowski/text-table
最新稳定版本:2.8.1
Composer 安装命令:
composer require marcin-orlowski/text-table
包简介
Fast and flexible PHP library for text tables.
README 文档
README
..######.#####.##...##.######...######...#....#####..##....#####..
....##...##.....##.##....##.......##....###...##..##.##....##.....
....##...##......###.....##.......##...##.##..##..##.##....##.....
....##...####.....#......##.......##..##...##.#####..##....####...
....##...##......###.....##.......##..#######.##..##.##....##.....
....##...##.....##.##....##.......##..##...##.##..##.##....##.....
....##...#####.##...##...##.......##..##...##.#####..#####.#####..
Fast and flexible PHP library for text tables.
There's also a Python version of this library.
Features
- Production ready,
- Easy to use,
- No additional dependencies,
- Documented.
Usage examples
NOTE: For proper rendering in environments like web browsers, ensure you are using a monospace
font or wrap the output in <pre> tags.
$table = new TextTable(['ID', 'NAME', 'SCORE']); $table->addRows([ [1, 'John', 12], [2, 'Tommy', 15], ]); echo $table->renderAsString();
would produce nice text table:
┌────┬───────┬───────┐ │ ID │ NAME │ SCORE │ ├────┼───────┼───────┤ │ 1 │ John │ 12 │ │ 2 │ Tommy │ 15 │ └────┴───────┴───────┘
Check docs for more usage examples.
License
- Written and copyrighted ©2022-2025 by Marcin Orlowski <mail (#) marcinorlowski (.) com>
- Text Table is open-sourced software licensed under the MIT license
统计信息
- 总下载量: 14.31k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-10-20