Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Php's method of finding provincial names according to city names
Php's method of finding provincial names according to city names
There are no provinces in the collection, only cities;

The method of finding province name by city name;

$allcitys = array(

Array ("Beijing"),

Array ("Shanghai"),

Array ("Tianjin"),

Array ("Chongqing"),

Array (Harbin, Qiqihar, Mudanjiang, Daqing, Yichun, Shuangyashan, Hegang, Jixi, Jiamusi, Qitaihe, Heihe, Suihua and Daxinganling),

Array (Changchun, Yanbian, Jilin, Baishan, Baicheng, Siping, Songyuan, Liaoyuan, Daan and Tonghua),

Array (Shenyang, Dalian, Huludao, Lushun, Benxi, Fushun, Tieling, Liaoyang, Yingkou, Fuxin, Chaoyang, Jinzhou, Dandong and Anshan),

Array (Hohhot, Hulunbeier, Xilinhot, Baotou, Chifeng, Hailar, Wuhai, Ordos and Tongliao),

Array (Shijiazhuang, Tangshan, Zhangjiakou, Langfang, Xingtai, Handan, Cangzhou, Hengshui, Chengde, Baoding and Qinhuangdao),

Array (Zhengzhou, Kaifeng, Luoyang, Pingdingshan, Jiaozuo, Hebi, Xinxiang, Anyang, Puyang, Xuchang, Luohe, Sanmenxia, Nanyang, Shangqiu and Xinyang),

Array (Jinan, Qingdao, Zibo, Weihai, Qufu, Linyi, Yantai, Zaozhuang, Liaocheng, Jining, Heze, Tai 'an, Rizhao, Dongying and Dezhou).

Array (Taiyuan, Yangquan, Jincheng, Jinzhong, Linfen, Yuncheng, Changzhi, Shuozhou, Xinzhou, Datong and Lvliang),

Array ("Nanjing", "Suzhou", "Kunshan", "Nantong", "Taicang", "Wuxian", "Xuzhou", "Yixing", "Zhenjiang", "Huai 'an", "Changshu", "Yancheng", "Taizhou", "Wuxi", "Lianyungang",

Array (Hefei, Chaohu, Bengbu, Anqing, Lu 'an, Chuzhou, Maanshan, Fuyang, Xuancheng, Tongling, Huaibei, Wuhu, Mizhou, Suzhou and Huainan),

Array (Xi 'an, Hancheng, Ankang, Hanzhong, Baoji, Xianyang, Yulin, Weinan, Shangluo, Tongchuan and Yan 'an),

Array (Yinchuan, Guyuan, Zhongwei, Shizuishan and Wuzhong),

Array (Lanzhou, Baiyin, Qingyang, Jiuquan, Tianshui, Wuwei, Zhangye, Gannan, Linxia, Pingliang, Dingxi and Jinchang),

Array (Xining, Haibei, Haixi, Huangnan, Guoluo, Yushu, Haidong and Hainan),

Array (Wuhan, Yichang, Huanggang, Enshi, Jingzhou, Shennongjia, Shiyan, Xianning, Xiangfan, Xiaogan, Suizhou, Huangshi, Jingmen and Ezhou),

Array (Changsha, Shaoyang, Changde, Chenzhou, Jishou, Zhuzhou, Loudi, Xiangtan, Yiyang, Yongzhou, Yueyang, Hengyang, Huaihua, Shaoshan and Zhangjiajie),

Array (Hangzhou, Huzhou, Jinhua, Ningbo, Lishui, Shaoxing, Yandangshan, Quzhou, Jiaxing, Taizhou, Zhoushan and Wenzhou),

Array (Nanchang, Pingxiang, Jiujiang, Shangrao, Fuzhou, Ji 'an, yingtan, Yichun, Xinyu, Jingdezhen and Ganzhou),

Array (Fuzhou, Xiamen, Longyan, Nanping, Ningde, Putian, Quanzhou, Sanming and Zhangzhou),

Array (Guiyang, Anshun, Chishui, Zunyi, Tongren, Liupanshui, Bijie, Kaili and Duyun),

Array (Chengdu, Luzhou, Neijiang, Liangshan, Aba, Bazhong, Guangyuan, Leshan, Mianyang, Deyang, Panzhihua, Ya 'an, Yibin, Zigong and Ganzi Prefecture).

Array ("Guangzhou", "Shenzhen", "Chaozhou", "Shaoguan", "Zhanjiang", "Huizhou", "Qingyuan", "Dongguan", "Jiangmen", "Maoming", "Zhaoqing", "Shanwei", "Heyuan", "Jieyang" and "Meizhou",

Array (Nanning, Guilin, Yangshuo, Liuzhou, Wuzhou, Yulin, Guiping, Hezhou, Qinzhou, Guigang, Fangchenggang, Baise, Beihai, Hechi and Laibin).

Array (Kunming, Baoshan, Chuxiong, Dehong, Honghe, Lincang, Nujiang, Qujing, Simao, Wenshan, Yuxi, Zhaotong, Lijiang and Dali),

Array (Haikou, Sanya, Danzhou, Qiongshan, Tongshi and Wenchang),

Array (Urumqi, Altay, Aksu, Changji, Hami, Hotan, Kashgar, Karamay, Shihezi, Tacheng, Korla, Turpan and Yining),

Array (Lhasa, Qamdo, Shannan, Ali, Naqu, Linzhi and Xigaze),

Array ("Hong Kong"),

Array ("Macau"),

Array ("Taiwan Province Province"),

);

$pro[0]= "Beijing";

$pro[ 1]= "Shanghai";

$pro[2]= "Tianjin";

$pro[3]= "Chongqing";

$pro[4]= "Heilongjiang";

$pro[5]= "Jilin";

$pro[6]= "Liaoning";

$pro[7]= "Inner Mongolia";

$pro[8]= "Hebei";

$pro[9]= "Henan";

$pro[ 10]= "Shandong";

$pro[ 1 1]= "Shanxi";

$pro[ 12]= "Jiangsu";

$pro[ 13]= "Anhui";

$pro[ 14]= "Shaanxi";

$pro[ 15]= "Ningxia";

$pro[ 16]= "Gansu";

$pro[ 17]= "Qinghai";

$pro[ 18]= "Hubei";

$pro[ 19]= "Hunan";

$pro[20]= "Zhejiang";

$pro[2 1]= "Jiangxi";

$pro[22]= "Fujian";

$pro[23]= "Guizhou";

$pro[24]= "Sichuan";

$pro[25]= "Guangdong";

$pro[26]= "Guangxi";

$pro[27]= "Yunnan";

$pro[28]= "Hainan";

$pro[29]= "Xinjiang";

$pro[30]= "Tibet";

$pro[3 1]= "Hong Kong";

$pro[32]= "Macau";

$pro[33]= "Taiwan Province Province";

for($ I = 0; $ i & ltcount($ all cities); $i++)

{

for($ j = 0; $ j & ltcount($ all cities[$ I]); $j++)

{

if($ all cities[$ I][$ j]= = $ area)

{

$ curr pro = $ pro[$ I];

}

}

}