sunnyflail / array-flattener
A simple trait for flattening arrays to php code strings
1.0.0
2021-06-06 00:39 UTC
Requires (Dev)
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.6
README
A simple trait for recursive flattening of arrays of strings into an executable php code
Sample usage
use SunnyFlail\ArrayFlattener\ArrayFlattener; $implementator = new class { use ArrayFlattener; public function sampleUsage() { $array = [ "First", "Second", "A key" => "A value" ]; var_dump($this->flattenArrayToString($array)); } };