keboola / symfony-console-nested-formatter-helper
Nested array formatter helper for Symfony Console
This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.
Package info
github.com/keboola/symfony-console-nested-formatter-helper
pkg:composer/keboola/symfony-console-nested-formatter-helper
0.1.2
2016-05-10 06:48 UTC
Requires
- symfony/console: 2.8.*
Requires (Dev)
- phpunit/phpunit: 4.8.*
This package is auto-updated.
Last update: 2025-05-29 00:50:27 UTC
README
Nested array formatter helper for Symfony Console.
Usage
$input = array( 'first' => 'something', 'second' => array( 'item 1' => 'val 1', 'item 2' => 'val 2', 'item 3' => array( 'sub item 1' => 'value 1', 'sub item 2' => 'value 2', ), 'item 4' => array( 'one', array( 'nested', 'more', ), 'three', ) ), 'third' => 'haha', ); $formatter = new NestedFormatterHelper(); echo $formatter->format($input);
Output:
first: something
second:
item 1: val 1
item 2: val 2
item 3:
sub item 1: value 1
sub item 2: value 2
item 4:
- one
-
- nested
- more
- three
third: haha