Unused variables $rows, $cols
Columns are hardcoded in the basic table loop instead of using the predefined $rows and $cols variables
This commit is contained in:
parent
733f845f8f
commit
2c7a306961
|
|
@ -17,9 +17,9 @@ $cols = 5;
|
||||||
$section->addText('Basic table', $header);
|
$section->addText('Basic table', $header);
|
||||||
|
|
||||||
$table = $section->addTable();
|
$table = $section->addTable();
|
||||||
for ($r = 1; $r <= 8; $r++) {
|
for ($r = 1; $r <= $rows; $r++) {
|
||||||
$table->addRow();
|
$table->addRow();
|
||||||
for ($c = 1; $c <= 5; $c++) {
|
for ($c = 1; $c <= $cols; $c++) {
|
||||||
$table->addCell(1750)->addText("Row {$r}, Cell {$c}");
|
$table->addCell(1750)->addText("Row {$r}, Cell {$c}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue