README.md 769 B

HSDN Recursive Table Generator

PHP class library for visualization Arrays as a HTML Table (for debug, parsers testing, etc.).

Usage example:

require_once 'RTG.php';

// Example array
$array = array
(
    'key_1' => 'Value 2',
    'key_2' => 'Value 2',
    'bool_Test' => TRUE,
    'null_Test' => NULL,
    'array_test' => array
    (
        'Value 1',
        'Value 2',
    ),
);

// Print CSS styles for HTML Table
echo '<style>';
echo RTG::css();
echo '</style>';

// Print HTML Table for array
RTG::table($array, TRUE);

// Build Table with return as string
$table = RTG::table($array, FALSE);

// Build Table with custom CSS
$table = RTG::table($array, FALSE, array('width' => '750px'));

Demonstration