rocket/表格

此包已被放弃,不再维护。未建议替代包。

表格显示助手

dev-master / 1.0.x-dev 2016-01-02 17:58 UTC

This package is auto-updated.

Last update: 2023-08-16 18:38:45 UTC


README

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

此库是一个辅助库,用于从数组生成HTML表格。

安装

通过Composer

$ composer require rocket/table

使用方法

$heads = ['Title', 'Author'];
$content = [
    ['The book I didn\'t write', 'Not Me']
    ['The book he wrote', 'It was me']
];

echo Table::quick($heads, $content);

将生成

<table class="table table-striped sticky-enabled">
    <thead>
        <tr><th>Title</th><th>Author</th></tr>
    </thead>
    <tbody>
        <tr><td>The book I didn't write</td><td>Not Me</td></tr>
        <tr><td>The book he wrote</td><td>It was me</td></tr>
    </tbody>
</table>

测试

所有测试都在 主项目 中。

贡献

请参阅 CONTRIBUTING 获取详细信息。

鸣谢

许可

MIT许可证(MIT)。请参阅 许可文件 获取更多信息。