我使用以下代码生成单选按钮:
$radio = new Zend_Form_Element_Radio('rating');
$radio->setLabel('Rating')
->addMultiOptions(array(
'1' => '1',
'2' => '2',
'3' => '3',
'4' => '4',
'5' => '5'
));
这会产生以下 HTML 输出:
<label for="rating-1">
<input id="rating-1" type="radio" value="1" name="rating">
1
</label>
<br>
<label for="rating-2">
<input id="rating-2" type="radio" value="2" name="rating">
2
</label>
<br>
<label for="rating-3">
<input id="rating-3" type="radio" value="3" name="rating">
3
</label>
<br>
<label for="rating-4">
<input id="rating-4" type="radio" value="4" name="rating">
4
</label>
<br>
<label for="rating-5">
<input id="rating-5" type="radio" value="5" name="rating">
5
</label>
如何删除每个<标签>之后的“<br>”标签?