tables/examples/simple.php
2024-07-31 12:48:26 +03:00

16 lines
408 B
PHP

<?php
require_once "../vendor/autoload.php";
use Itguild\Tables\ListJsonTable;
$json = file_get_contents('simple.json');
$table = new ListJsonTable($json);
$table->setBeforePrintCell(function ($key, $data) {
return $key == "email" ? "<span style='color: aqua'>$data</span>" : $data;
});
$table->afterPrint(function ($meta) {
return "<div>After Print</div>";
});
$table->create();
$table->render();