$human) { $pairs[] = "`$human` | `$machine`"; } $rows = (int) ceil(count($pairs) / $cols); $out = "### $title\n\n|" . str_repeat(' Format 90 | Machine |', $cols) . "\n|" . str_repeat('---|---|', $cols) . "\n"; for ($r = 0; $r < $rows; $r++) { $line = []; for ($c = 0; $c < $cols; $c++) { $line[] = $pairs[$c * $rows + $r] ?? ' | '; } $out .= '| ' . implode(' | ', $line) . " |\n"; } return $out . "\n"; }; echo $table('Mots de contrôle', Human::CONTROL + ['{ … }' => 'alors … finsi / faire … fintantque', '} else {' => 'sinon']); echo $table('En-tête', Human::DIRECTIVES); echo $table('Fonctions', Human::FUNCTIONS); echo $table('Instructions', Human::STATEMENTS);