diff --git a/components/console/helpers/table.rst b/components/console/helpers/table.rst index e83ed352a3e..8d160689de7 100644 --- a/components/console/helpers/table.rst +++ b/components/console/helpers/table.rst @@ -432,3 +432,24 @@ This will display the following table in the terminal: | Love | | Symfony | +---------+ + +.. tip:: + + You can create multiple lines using the :method:`Symfony\\Component\\Console\\Helper\\Table::addRows` method:: + + // ... + $table->addRows([ + ['Hello', 'World'], + ['Love', 'Symfony'], + ]); + $table->render(); + // ... + + This will display: + + .. code-block:: terminal + + +-------+---------+ + | Hello | World | + | Love | Symfony | + +-------+---------+