Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/226.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在PHP中禁用“添加选定选项”_Php_Arrays_Drop Down Menu - Fatal编程技术网

在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

在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", "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
);