1. Go to this page and download the library: Download jdz/table library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jdz / table example snippets
use JDZ\Table\Table;
// Create a table with headers
$table = new Table(['Name', 'Age', 'City']);
// Add rows
$table->addRow(['John Doe', '30', 'New York'])
->addRow(['Jane Smith', '25', 'Los Angeles']);
// Render the table
echo $table->render();
$table = new Table(['Column 1', 'Column 2', 'Column 3']);
use JDZ\Table\Th;
$header1 = new Th('Name');
$header1->setStyle('color', 'blue');
$table = new Table([$header1, 'Age', 'Email']);