diff --git a/outputtxt.php b/outputtxt.php index 7bfb2d8..3087660 100644 --- a/outputtxt.php +++ b/outputtxt.php @@ -58,9 +58,18 @@ class outputtxt extends output } } + if ($this->table === true) { // Display the table if it is not a tree format + + // Check if the titles are longer than the data + foreach (reset ($data) as $key=>$val) + { + if (strlen ($key) > $sizes[$key]) + $sizes[$key] = strlen ($key); + } + // Prepare the border $line = reset ($data); $border = "";