Console_Table examples

Table of Contents

To get the feeling how Console_Table is used, try out the following examples.

A very simple example

Here we are following the basic steps to get some data out on the shell:

  • Creating a Console_Table object

  • Adding the header row

  • Adding some data rows

  • Rendering the table to the shell

require_once 'Console/Table.php';

$tbl = new Console_Table();
$tbl->addRow(array('C',   1970));


This examples would display as following:

| Language | Year |
| PHP      | 1994 |
| C        | 1970 |
| C++      | 1983 |
Introduction to Console_Table (Previous) Using column filtering with Console_Color (Next)
Last updated: Thu, 26 Nov 2015 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.