concrete/src/Utility/Service/Arrays.php
public function flatten(array $array)
    {
        $tmp = array();
        foreach ($array as $a) {
            if (is_array($a)) {
                $tmp = array_merge($tmp, array_flat($a));
            } else {
                $tmp[] = $a;
            }
        }

        return $tmp;
    }
public function flatten(array $array)
    {
        $tmp = array();
        foreach ($array as $a) {
            if (is_array($a)) {
                $tmp = array_merge($tmp, array_flat($a));
            } else {
                $tmp[] = $a;
            }
        }

        return $tmp;
    }
public function flatten ( array $ array ) { $ tmp = array ( ) ; foreach ( $ array as $ a ) { if ( is_array ( $ a ) ) { $ tmp = array_merge ( $ tmp , array_flat ( $ a ) ) ; } else { $ tmp [ ] = $ a ; } } return $ tmp ; }
Takes a multidimensional array and flattens it.

@param array $array

@return array
Takes a multidimensional array and flattens it .