itdarkarts / html-table
Simple API to create tables as HTML.
1.0.0
2026-10-18 22:33 UTC
Requires
- php: >=8.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-20 01:07:57 UTC
README
This is a PHP language API library for building tables for rendering in HTML.
This library is intended for simplicity and velocity. Instead of mixing PHP with inline HTML code (which is difficult to read), or utilizing heavy frameworks (which are a time-sink to get acquainted with), this API library enables developers to programatically build HTML code for rendering tables.
This is also useful to update table rows and columns via AJAX.
- Minimum required PHP: 8.0
- AI was not used in creating this library.
Example
A simple report table:
<?php // Acquired via Composer. require "vendor/autoload.php"; use ITDarkArts\HTML\Table\table; // Widgets data is already validated. $widgets_data = $database->get_widgets_data(); $table = new table( id: "widgets_data", class: "widgets_css widgets_js", caption: "Widgets" ); $table->thead(); $table->row(["Widget", "Quality", "Stock", "Value"]); $table->tbody(); foreach($widgets_data as $row) { // Already validated that each row is an array of four columns. $table->row($row); } print $table->html();