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-10-06 07:51:17 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));
    }

};