Skip to content

Commit

Permalink
up fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kiss291323003 committed Apr 8, 2020
1 parent 585252b commit cf5d157
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/ArrayToTextTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ public function getTable($data = null)
$table .= $i . $this->row($headerRows, $this->keysAlignment) . PHP_EOL;
$table .= $i . $this->line('', '', '', '') . PHP_EOL;
}

foreach ($data as $row){
$table .= $i . $this->row($row, $this->valuesAlignment) . PHP_EOL;
$len = count($data);
for($index = 0;$index < $len;$index ++ ){
$table .= $i . $this->row($data[$index], $this->valuesAlignment) . PHP_EOL;
if($index +1 < $len){
$table .= $i . $this->line('', '', '', '') . PHP_EOL;
}
}
$table .= $i . $this->line('', '', '', '') . PHP_EOL;

Expand Down

0 comments on commit cf5d157

Please sign in to comment.