在PHP中禁用“添加选定选项”
在PHP中,我有一个带有下拉字段的表单,其中包含以下数组:在PHP中禁用“添加选定选项”,php,arrays,drop-down-menu,Php,Arrays,Drop Down Menu,在PHP中,我有一个带有下拉字段的表单,其中包含以下数组: $field["options"] = array( array("value" => "Chişinău", "text" => "Chişinău", "depth" => 0), array("value" => "Bălţi", "text" => "Bălţi", "depth" => 0), array("value" => "Comrat", "tex
$field["options"] = array(
array("value" => "Chişinău", "text" => "Chişinău", "depth" => 0),
array("value" => "Bălţi", "text" => "Bălţi", "depth" => 0),
array("value" => "Comrat", "text" => "Comrat", "depth" => 0),
...
array("value" => "Ungheni", "text" => "Ungheni", "depth" => 0)
);
如何添加作为第一个选项的选择一个?尝试数组(“值”=>“Chişinău”,“文本”=>“Chişinău”,“深度”=>0,“选中”=>“选中”,“禁用”=>“禁用”),
?
$field["options"] = array(
array("value" => " ", "text" => "Choose one", "depth" => 0, "selected" => "selected", "disabled" => "disabled"),
//...rest other option code
);