/** * Get a list of days * * @param string $name the name and id of the select element * @param int $selected the currently selected day * @return string select list populated with weekdays */ public static function getWeekdays($name, $selected = null) { $html = <<<HTML \t\t\t<select name="{$name}" id="{$name}"> HTML; foreach (phpgwapi_datetime::get_dow_fullnames() as $id => $dow) { $slctd = $id == $selected ? ' selected' : ''; $html .= <<<HTML \t\t\t\t<option value="{$id}"{$slctd}>{$dow}</option> HTML; } $html .= <<<HTML \t\t\t</select> HTML; return $html; }