2017 © Pedro Peláez
 

library console-table

A table generator class for the PHP CLI.

image

snufkin/console-table

A table generator class for the PHP CLI.

  • Saturday, April 8, 2017
  • by snufkin
  • Repository
  • 0 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Install

  1. Install composer
  2. Run composer require snufkin/ConsoleTable
  3. Profit!

Usage

$table = new \Console\Helper\ConsoleTable();
$table->setHeaders(['Column 1', 'Column 2']);
$table->addRow(['data 1', 'data 2']);
$table->addRow(['data 3', 'data 4']);
$table->addRow(['data 5', 'data 6']);
echo $table->getTable();

Customisations

By default all columns are aligned left. To change the alignment use the 0 as the first parameter in the constructor:, (*1)

$table = new \Console\Helper\ConsoleTable(0);

The Versions

08/04 2017

dev-master

9999999-dev

A table generator class for the PHP CLI.

  Sources   Download

BSD

The Requires

  • php >=5.3.0

 

console

22/04 2013

1.0

1.0.0.0

A table generator class for the PHP CLI.

  Sources   Download

BSD

The Requires

  • php >=5.3.0

 

console