public static function select($name, array $options, $selected = NULL, array $attributes = NULL)
    {
        $h = '';
        foreach ($options as $k => $v) {
            $a = array('value' => $k);

            // Is this element one of the selected options?
            if ($selected AND in_array($k, (array)$selected)) {
                $a['selected'] = 'selected';
            }

            $h .= self::tag('option', $v, $a);
        }

        if (!$attributes) {
            $attributes = array();
        }

        return self::tag('select', $h, $attributes + array('name' => $name));
    }