을 사용하여 자세한 정보 HTML을 생성 I가 나는 다음과 같은 PHP를 사용하여 간단한 선택 요소를 추가하려고 형태 : 그것은 잘 페이지로 렌더링젠드 프레임 워크 : 젠드 양식을 선택 MultiOptions
$dateFormat = new Zend_Form_Element_Select('dateFormat');
$dateFormat->setLabel('Date Format:');
$dateFormat->setRequired(true)->addValidator('NotEmpty');
$dateFormat->addMultiOptions(array(
'MM/dd/yyyy' => "US Standard - MM/dd/yyyy",
'dd/MM/yyyy' => "Int'l Standard - dd/MM/yyyy",
'MM-dd-yyyy' => "US Standard Dash - MM/dd/yyyy",
'dd-MM-yyyy' => "Int'l Standard Dash - dd/MM/yyyy",
));
$this->addElement($dateFormat,'dateFormat');
을, 그러나
<dt id="dateFormat-label"><label for="dateFormat" class="required">Date Format:</label></dt>
<dd id="dateFormat-element">
<select name="dateFormat" id="dateFormat">
<option value="MM/dd/yyyy" label="US Standard - MM/dd/yyyy">US Standard - MM/dd/yyyy</option>
<option value="dd/MM/yyyy" label="Int'l Standard - dd/MM/yyyy">Int'l Standard - dd/MM/yyyy</option>
<option value="MM-dd-yyyy" label="US Standard Dash - MM/dd/yyyy">US Standard Dash - MM/dd/yyyy</option>
<option value="dd-MM-yyyy" label="Int'l Standard Dash - dd/MM/yyyy">Int'l Standard Dash - dd/MM/yyyy</option>
</select></dd>
이유는 <option>
태그에 ..label="..."
을두고있다 : 다음과 같은 XML을 생성? 이것이 실제로 XHTML 표준에서 어떻게 처리되어야할까요? 내 doctype을 XHTML Strict로 설정했습니다.