PHP code example of reinvanoyen / oak-console-table

1. Go to this page and download the library: Download reinvanoyen/oak-console-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/ */

    

reinvanoyen / oak-console-table example snippets




$table = new \Tnt\ConsoleTable\Table($output); // $output = OutputInterface

$table->setHeaders(['Id', 'Username', 'Email address',]);
$table->setRows([
    [1, 'Rein', '[email protected]',],
    [2, 'JohnDoe21', '[email protected]',],
    [3, 'butterfly1982', '[email protected]',],
]);

$table->addRow([4, 'user45', '[email protected]',]);

$table->output();