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...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn