1. Go to this page and download the library: Download midorikocak/tabletools 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/ */
midorikocak / tabletools example snippets
declare(strict_types=1);
namespace midorikocak\tabletools;
interface TableInterface
{
public function sort(string $key, $order = 'ASC'): self;
public function columns($keys): self;
public function filter(string $key, $value): self;
public function search(string $key, $value): self;
public function range(int $offset, ?int $limit = null): self;
public function paginate(int $page = 0, int $pageSize = 10): self;
public function run(): array;
}
$pdo = new PDO();
$db = new \midorikocak\nanodb\Database($pdo);
$databaseTable = new \midorikocak\tabletools\DatabaseTable($db);
$data = getArrayFromCsv('tests/small-name.csv');
$arrayTable = new ArrayTable($data);