sunnyflail/array-flattener

A simple trait for flattening arrays to php code strings

1.0.0 2021-06-06 00:39 UTC

This package is auto-updated.

Last update: 2024-05-06 06:53:11 UTC


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));
    }

};