src/Util/Helper.php
public static function flatten(array $arr)
    {
        $flattened = [];

        array_walk_recursive($arr, function ($a) use (&$flattened) {
            $flattened[] = $a;
        });

        return $flattened;
    }
public static function flatten(array $arr)
    {
        $flattened = [];

        array_walk_recursive($arr, function ($a) use (&$flattened) {
            $flattened[] = $a;
        });

        return $flattened;
    }
public static function flatten ( array $ arr ) { $ flattened = [ ] ; array_walk_recursive ( $ arr , function ( $ a ) use ( & $ flattened ) { $ flattened [ ] = $ a ; } ) ; return $ flattened ; }
Flatten a multi-dimensional array

@param array $arr

@return array
Flatten a multi - dimensional array