protected function flattenData(array $data, $prefix = '', $format = '%s')
    {
        $flat = array();

        foreach ($data as $name => $value) {

            $ref = $prefix . sprintf($format, $name);

            if (is_array($value)) {

                $flat += $this->flattenData($value, $ref, '[%s]');
                continue;
            }

            $flat[$ref] = $value;
        }

        return $flat;
    }
protected function flattenData(array $data, $prefix = '', $format = '%s')
    {
        $flat = array();

        foreach ($data as $name => $value) {

            $ref = $prefix . sprintf($format, $name);

            if (is_array($value)) {

                $flat += $this->flattenData($value, $ref, '[%s]');
                continue;
            }

            $flat[$ref] = $value;
        }

        return $flat;
    }
protected function flattenData ( array $ data , $ prefix = '' , $ format = '%s' ) { $ flat = array ( ) ; foreach ( $ data as $ name => $ value ) { $ ref = $ prefix . sprintf ( $ format , $ name ) ; if ( is_array ( $ value ) ) { $ flat += $ this -> flattenData ( $ value , $ ref , '[%s]' ) ; continue ; } $ flat [ $ ref ] = $ value ; } return $ flat ; }
Flatten data into single
dimensional array

@access protected
@param  array  $data
@param  string $prefix
@param  string $format
@return array
Flatten data into single dimensional array