HSDN Recursive Table Generator
|
|
лет назад: 9 | |
|---|---|---|
| README.md | лет назад: 9 | |
| RTG.php | лет назад: 9 |
PHP class library for visualization Arrays as a HTML Table (for debug, parsers testing, etc.).
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'));