<u>复制代码</u> 代码如下: <br>$cityname = array_flip($city_DB[name]); //把数组的键和值交换形成了新的数组 <br>$city_name = array_search($city_id,$cityname,true); //查找值取得键 <br>