Copy code The code is as follows:
$cityname = array_flip($city_DB[name]); //Exchange the keys and values of the array A new array is formed
$city_name = array_search($city_id,$cityname,true); //Find the value and get the key
http://www.bkjia.com/PHPjc/323421.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/323421.htmlTechArticleCopy the code The code is as follows: $cityname = array_flip($city_DB[name]); //Add the keys of the array to The value exchange forms a new array $city_name = array_search($city_id,$cityname,true); //The search value is...