aOptions[] = array('IdValue' => $IdValue, 'DisplayValue' => $DisplayValue, 'Attributes' => $Attributes); } function AddOptionsFromAssociativeArray($Array, $KeyPrefix) { while (list($key, $val) = each($Array)) { $this->AddOption($KeyPrefix.$key, $val); } } function AddOptionsFromDataSet(&$Database, $DataSet, $IdField, $DisplayField) { while ($rows = $Database->GetRow($DataSet)) { $this->AddOption($rows[$IdField], $rows[$DisplayField]); } } function Clear() { $this->Name = ''; $this->CssClass = 'LargeSelect'; $this->Attributes = ''; $this->aOptions = array(); } function ClearOptions() { $this->aOptions = array(); } function Count() { return count($this->aOptions); } function Get() { $sReturn = ' '; return $sReturn; } function RemoveOption($IdValue) { if ($IdValue == $this->SelectedValue) $this->SelectedValue = ''; $OptionCount = count($this->aOptions); $i = 0; for($i = 0; $i < $OptionCount; $i++) { if ($this->aOptions[$i]['IdValue'] == $IdValue) { array_splice($this->aOptions, $i, 1); break; } } } function Select() { $this->Clear(); } function Write() { echo($this->Get()); } } ?>