private static function _parse_form_attributes($attributes, $default)
    {
        if (is_array($attributes)) {
            foreach ($default as $key => $val) {
                if (isset($attributes[$key])) {
                    $default[$key] = $attributes[$key];
                    unset($attributes[$key]);
                }
            }

            if (count($attributes) > 0) {
                $default = array_merge($default, $attributes);
            }
        }

        $att = '';

        foreach ($default as $key => $val) {
            if ($key == 'value') {
                $val = self::form_prep($val, $default['name']);
            }

            $att .= $key . '="' . $val . '" ';
        }

        return $att;
    }
private static function _parse_form_attributes($attributes, $default)
    {
        if (is_array($attributes)) {
            foreach ($default as $key => $val) {
                if (isset($attributes[$key])) {
                    $default[$key] = $attributes[$key];
                    unset($attributes[$key]);
                }
            }

            if (count($attributes) > 0) {
                $default = array_merge($default, $attributes);
            }
        }

        $att = '';

        foreach ($default as $key => $val) {
            if ($key == 'value') {
                $val = self::form_prep($val, $default['name']);
            }

            $att .= $key . '="' . $val . '" ';
        }

        return $att;
    }
private static function _parse_form_attributes ( $ attributes , $ default ) { if ( is_array ( $ attributes ) ) { foreach ( $ default as $ key => $ val ) { if ( isset ( $ attributes [ $ key ] ) ) { $ default [ $ key ] = $ attributes [ $ key ] ; unset ( $ attributes [ $ key ] ) ; } } if ( count ( $ attributes ) > 0 ) { $ default = array_merge ( $ default , $ attributes ) ; } } $ att = '' ; foreach ( $ default as $ key => $ val ) { if ( $ key == 'value' ) { $ val = self :: form_prep ( $ val , $ default [ 'name' ] ) ; } $ att .= $ key . '="' . $ val . '" ' ; } return $ att ; }
Parse the form attributes
@ignore
@param mixed $attributes
@param mixed $default
@return string
Parse the form attributes