static function select($name, array $values, $val, $text, $selected, $padrao = null, $attr = array())
    {
        $html = '<select ';
        $attr = array_merge(array("name" => $name), $attr);
        $html .= self::getAttributes($attr);
        $html .= ">";

        if ($padrao != null)
            $html .= '<option value="">' . $padrao . '</option>';

        foreach ($values as $value) {
            if (isset($value->$val) and isset($value->$text))
                $html .= '<option value="' . $value->$val . '" ' . ($value->$val == $selected ? " selected " : "") . '>' . $value->$text . '</option>';
        }

        $html .= "</select>";

        echo $html;
    }