这是代码
<select id="filter_step_id" onchange="master.updateFilter();" name="filter_step_id">
<option value="">Step</option>
<option value="setup">company</option>
<option value="cofounder">co-founder</option>
<option value="project">project</option>
<option value="idea">idea</option>
<option value="product">product</option>
<option value="sell">Sell</option>
<option value="money">money</option>
<option value="talent">talent</option>
如何计算此下拉菜单中的选项数量并获取文本并将它们放入数组(而不是值)?
这是我得到的
$numOptions = $this->storeXpathCount("//select[contains(@id,'filter_step_id')]//option[contains(@value, '')]");
for($i = 0; $i <= $numOptions; $i ++) {
(code to select one option and checking if the text is present from using the filter)
}