博客列表 >PHP多维数组

PHP多维数组

可乐
可乐原创
2021年10月16日 23:15:57586浏览

打印多维数组

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>Document</title>
  8. </head>
  9. <body>
  10. <?php
  11. $arr = [ [
  12. 'area_id' => 110000,
  13. 'area_pid' => 0,
  14. 'area_name' => '北京',
  15. 'lng' => 116.405,
  16. 'lat' => 39.905,
  17. 'son' => [
  18. [
  19. 'area_id' => 110100,
  20. 'area_pid' => 110000,
  21. 'area_name' => '北京市',
  22. 'lng' => 116.405,
  23. 'lat' => 39.905,
  24. 'son' => [
  25. [
  26. 'area_id' => 110101,
  27. 'area_pid' => 110100,
  28. 'area_name' => '东城区',
  29. 'lng' => 116.41,
  30. 'lat' => 39.9316
  31. ],
  32. [
  33. 'area_id' => 110102,
  34. 'area_pid' => 110100,
  35. 'area_name' => '西城区',
  36. 'lng' => 116.36,
  37. 'lat' => 39.9305
  38. ],
  39. [
  40. 'area_id' => 110105,
  41. 'area_pid' => 110100,
  42. 'area_name' => '朝阳区',
  43. 'lng' => 116.485,
  44. 'lat' => 39.9484
  45. ],
  46. [
  47. 'area_id' => 110106,
  48. 'area_pid' => 110100,
  49. 'area_name' => '丰台区',
  50. 'lng' => 116.286,
  51. 'lat' => 39.8585
  52. ],
  53. [
  54. 'area_id' => 110107,
  55. 'area_pid' => 110100,
  56. 'area_name' => '石景山区',
  57. 'lng' => 116.223,
  58. 'lat' => 39.9056
  59. ],
  60. [
  61. 'area_id' => 110108,
  62. 'area_pid' => 110100,
  63. 'area_name' => '海淀区',
  64. 'lng' => 116.298,
  65. 'lat' => 39.9593
  66. ],
  67. [
  68. 'area_id' => 110109,
  69. 'area_pid' => 110100,
  70. 'area_name' => '门头沟区',
  71. 'lng' => 116.101,
  72. 'lat' => 39.9404
  73. ],
  74. [
  75. 'area_id' => 110111,
  76. 'area_pid' => 110100,
  77. 'area_name' => '房山区',
  78. 'lng' => 116.143,
  79. 'lat' => 39.7479
  80. ],
  81. [
  82. 'area_id' => 110112,
  83. 'area_pid' => 110100,
  84. 'area_name' => '通州区',
  85. 'lng' => 116.657,
  86. 'lat' => 39.9097
  87. ],
  88. [
  89. 'area_id' => 110113,
  90. 'area_pid' => 110100,
  91. 'area_name' => '顺义区',
  92. 'lng' => 116.654,
  93. 'lat' => 40.1302
  94. ],
  95. [
  96. 'area_id' => 110114,
  97. 'area_pid' => 110100,
  98. 'area_name' => '昌平区',
  99. 'lng' => 116.231,
  100. 'lat' => 40.2207
  101. ],
  102. [
  103. 'area_id' => 110115,
  104. 'area_pid' => 110100,
  105. 'area_name' => '大兴区',
  106. 'lng' => 116.341,
  107. 'lat' => 39.7267
  108. ],
  109. [
  110. 'area_id' => 110116,
  111. 'area_pid' => 110100,
  112. 'area_name' => '怀柔区',
  113. 'lng' => 116.632,
  114. 'lat' => 40.316
  115. ],
  116. [
  117. 'area_id' => 110117,
  118. 'area_pid' => 110100,
  119. 'area_name' => '平谷区',
  120. 'lng' => 117.121,
  121. 'lat' => 40.1406
  122. ],
  123. [
  124. 'area_id' => 110228,
  125. 'area_pid' => 110100,
  126. 'area_name' => '密云县',
  127. 'lng' => 116.843,
  128. 'lat' => 40.3762
  129. ],
  130. [
  131. 'area_id' => 110229,
  132. 'area_pid' => 110100,
  133. 'area_name' => '延庆县',
  134. 'lng' => 115.975,
  135. 'lat' => 40.4567
  136. ]
  137. ]
  138. ]
  139. ]
  140. ],
  141. [
  142. 'area_id' => 120000,
  143. 'area_pid' => 0,
  144. 'area_name' => '天津',
  145. 'lng' => 117.19,
  146. 'lat' => 39.1256,
  147. 'son' => [
  148. [
  149. 'area_id' => 120100,
  150. 'area_pid' => 120000,
  151. 'area_name' => '天津市',
  152. 'lng' => 117.19,
  153. 'lat' => 39.1256,
  154. 'son' => [
  155. [
  156. 'area_id' => 120101,
  157. 'area_pid' => 120100,
  158. 'area_name' => '和平区',
  159. 'lng' => 117.215,
  160. 'lat' => 39.1172
  161. ],
  162. [
  163. 'area_id' => 120102,
  164. 'area_pid' => 120100,
  165. 'area_name' => '河东区',
  166. 'lng' => 117.226,
  167. 'lat' => 39.1232
  168. ],
  169. [
  170. 'area_id' => 120103,
  171. 'area_pid' => 120100,
  172. 'area_name' => '河西区',
  173. 'lng' => 117.223,
  174. 'lat' => 39.1096
  175. ],
  176. [
  177. 'area_id' => 120104,
  178. 'area_pid' => 120100,
  179. 'area_name' => '南开区',
  180. 'lng' => 117.151,
  181. 'lat' => 39.1382
  182. ],
  183. [
  184. 'area_id' => 120105,
  185. 'area_pid' => 120100,
  186. 'area_name' => '河北区',
  187. 'lng' => 117.197,
  188. 'lat' => 39.1482
  189. ],
  190. [
  191. 'area_id' => 120106,
  192. 'area_pid' => 120100,
  193. 'area_name' => '红桥区',
  194. 'lng' => 117.151,
  195. 'lat' => 39.1671
  196. ],
  197. [
  198. 'area_id' => 120110,
  199. 'area_pid' => 120100,
  200. 'area_name' => '东丽区',
  201. 'lng' => 117.314,
  202. 'lat' => 39.0863
  203. ],
  204. [
  205. 'area_id' => 120111,
  206. 'area_pid' => 120100,
  207. 'area_name' => '西青区',
  208. 'lng' => 117.009,
  209. 'lat' => 39.1412
  210. ],
  211. [
  212. 'area_id' => 120112,
  213. 'area_pid' => 120100,
  214. 'area_name' => '津南区',
  215. 'lng' => 117.385,
  216. 'lat' => 38.9914
  217. ],
  218. [
  219. 'area_id' => 120113,
  220. 'area_pid' => 120100,
  221. 'area_name' => '北辰区',
  222. 'lng' => 117.132,
  223. 'lat' => 39.2213
  224. ],
  225. [
  226. 'area_id' => 120114,
  227. 'area_pid' => 120100,
  228. 'area_name' => '武清区',
  229. 'lng' => 117.044,
  230. 'lat' => 39.3842
  231. ],
  232. [
  233. 'area_id' => 120115,
  234. 'area_pid' => 120100,
  235. 'area_name' => '宝坻区',
  236. 'lng' => 117.31,
  237. 'lat' => 39.7176
  238. ],
  239. [
  240. 'area_id' => 120116,
  241. 'area_pid' => 120100,
  242. 'area_name' => '滨海新区',
  243. 'lng' => 117.702,
  244. 'lat' => 39.0267
  245. ],
  246. [
  247. 'area_id' => 120221,
  248. 'area_pid' => 120100,
  249. 'area_name' => '宁河县',
  250. 'lng' => 117.826,
  251. 'lat' => 39.3305
  252. ],
  253. [
  254. 'area_id' => 120223,
  255. 'area_pid' => 120100,
  256. 'area_name' => '静海县',
  257. 'lng' => 116.974,
  258. 'lat' => 38.9458
  259. ],
  260. [
  261. 'area_id' => 120225,
  262. 'area_pid' => 120100,
  263. 'area_name' => '蓟县',
  264. 'lng' => 117.408,
  265. 'lat' => 40.0457
  266. ]
  267. ]
  268. ]
  269. ]
  270. ],
  271. [
  272. 'area_id' => 130000,
  273. 'area_pid' => 0,
  274. 'area_name' => '河北省',
  275. 'lng' => 114.502,
  276. 'lat' => 38.0455,
  277. 'son' => [
  278. [
  279. 'area_id' => 130100,
  280. 'area_pid' => 130000,
  281. 'area_name' => '石家庄市',
  282. 'lng' => 114.502,
  283. 'lat' => 38.0455,
  284. 'son' => [
  285. [
  286. 'area_id' => 130102,
  287. 'area_pid' => 130100,
  288. 'area_name' => '长安区',
  289. 'lng' => 114.539,
  290. 'lat' => 38.0367,
  291. ],
  292. [
  293. 'area_id' => 130104,
  294. 'area_pid' => 130100,
  295. 'area_name' => '桥西区',
  296. 'lng' => 114.47,
  297. 'lat' => 38.0322
  298. ],
  299. [
  300. 'area_id' => 130105,
  301. 'area_pid' => 130100,
  302. 'area_name' => '新华区',
  303. 'lng' => 114.463,
  304. 'lat' => 38.0509
  305. ],
  306. [
  307. 'area_id' => 130107,
  308. 'area_pid' => 130100,
  309. 'area_name' => '井陉矿区',
  310. 'lng' => 114.065,
  311. 'lat' => 38.0671
  312. ],
  313. [
  314. 'area_id' => 130108,
  315. 'area_pid' => 130100,
  316. 'area_name' => '裕华区',
  317. 'lng' => 114.531,
  318. 'lat' => 38.006
  319. ],
  320. [
  321. 'area_id' => 130109,
  322. 'area_pid' => 130100,
  323. 'area_name' => '藁城区',
  324. 'lng' => 114.847,
  325. 'lat' => 38.0216
  326. ],
  327. [
  328. 'area_id' => 130110,
  329. 'area_pid' => 130100,
  330. 'area_name' => '鹿泉区',
  331. 'lng' => 114.313,
  332. 'lat' => 38.0878
  333. ],
  334. [
  335. 'area_id' => 130111,
  336. 'area_pid' => 130100,
  337. 'area_name' => '栾城区',
  338. 'lng' => 114.648,
  339. 'lat' => 37.9002
  340. ],
  341. [
  342. 'area_id' => 130121,
  343. 'area_pid' => 130100,
  344. 'area_name' => '井陉县',
  345. 'lng' => 114.143,
  346. 'lat' => 38.0369
  347. ],
  348. [
  349. 'area_id' => 130123,
  350. 'area_pid' => 130100,
  351. 'area_name' => '正定县',
  352. 'lng' => 114.573,
  353. 'lat' => 38.1445
  354. ],
  355. [
  356. 'area_id' => 130125,
  357. 'area_pid' => 130100,
  358. 'area_name' => '行唐县',
  359. 'lng' => 114.553,
  360. 'lat' => 38.4365
  361. ],
  362. [
  363. 'area_id' => 130126,
  364. 'area_pid' => 130100,
  365. 'area_name' => '灵寿县',
  366. 'lng' => 114.383,
  367. 'lat' => 38.3084
  368. ],
  369. [
  370. 'area_id' => 130127,
  371. 'area_pid' => 130100,
  372. 'area_name' => '高邑县',
  373. 'lng' => 114.611,
  374. 'lat' => 37.6156
  375. ],
  376. [
  377. 'area_id' => 130128,
  378. 'area_pid' => 130100,
  379. 'area_name' => '深泽县',
  380. 'lng' => 115.204,
  381. 'lat' => 38.1835
  382. ],
  383. [
  384. 'area_id' => 130129,
  385. 'area_pid' => 130100,
  386. 'area_name' => '赞皇县',
  387. 'lng' => 114.388,
  388. 'lat' => 37.6614
  389. ],
  390. [
  391. 'area_id' => 130130,
  392. 'area_pid' => 130100,
  393. 'area_name' => '无极县',
  394. 'lng' => 114.975,
  395. 'lat' => 38.1765
  396. ],
  397. [
  398. 'area_id' => 130131,
  399. 'area_pid' => 130100,
  400. 'area_name' => '平山县',
  401. 'lng' => 114.186,
  402. 'lat' => 38.2599
  403. ],
  404. [
  405. 'area_id' => 130132,
  406. 'area_pid' => 130100,
  407. 'area_name' => '元氏县',
  408. 'lng' => 114.525,
  409. 'lat' => 37.7667
  410. ],
  411. [
  412. 'area_id' => 130133,
  413. 'area_pid' => 130100,
  414. 'area_name' => '赵县',
  415. 'lng' => 114.776,
  416. 'lat' => 37.7563
  417. ],
  418. [
  419. 'area_id' => 130181,
  420. 'area_pid' => 130100,
  421. 'area_name' => '辛集市',
  422. 'lng' => 115.206,
  423. 'lat' => 37.9408
  424. ],
  425. [
  426. 'area_id' => 130183,
  427. 'area_pid' => 130100,
  428. 'area_name' => '晋州市',
  429. 'lng' => 115.043,
  430. 'lat' => 38.0313
  431. ],
  432. [
  433. 'area_id' => 130184,
  434. 'area_pid' => 130100,
  435. 'area_name' => '新乐市',
  436. 'lng' => 114.69,
  437. 'lat' => 38.3442
  438. ]
  439. ]
  440. ],
  441. [
  442. 'area_id' => 130200,
  443. 'area_pid' => 130000,
  444. 'area_name' => '唐山市',
  445. 'lng' => 118.175,
  446. 'lat' => 39.6351,
  447. 'son' => [
  448. [
  449. 'area_id' => 130284,
  450. 'area_pid' => 130200,
  451. 'area_name' => '滦州市',
  452. 'lng' => '',
  453. 'lat' => ''
  454. ],
  455. [
  456. 'area_id' => 130202,
  457. 'area_pid' => 130200,
  458. 'area_name' => '路南区',
  459. 'lng' => 118.154,
  460. 'lat' => 39.625,
  461. ],
  462. [
  463. 'area_id' => 130203,
  464. 'area_pid' => 130200,
  465. 'area_name' => '路北区',
  466. 'lng' => 118.201,
  467. 'lat' => 39.6244
  468. ],
  469. [
  470. 'area_id' => 130204,
  471. 'area_pid' => 130200,
  472. 'area_name' => '古冶区',
  473. 'lng' => 118.458,
  474. 'lat' => 39.7199
  475. ],
  476. [
  477. 'area_id' => 130205,
  478. 'area_pid' => 130200,
  479. 'area_name' => '开平区',
  480. 'lng' => 118.262,
  481. 'lat' => 39.6713
  482. ],
  483. [
  484. 'area_id' => 130207,
  485. 'area_pid' => 130200,
  486. 'area_name' => '丰南区',
  487. 'lng' => 118.113,
  488. 'lat' => 39.5648
  489. ],
  490. [
  491. 'area_id' => 130208,
  492. 'area_pid' => 130200,
  493. 'area_name' => '丰润区',
  494. 'lng' => 118.13,
  495. 'lat' => 39.8244
  496. ],
  497. [
  498. 'area_id' => 130209,
  499. 'area_pid' => 130200,
  500. 'area_name' => '曹妃甸区',
  501. 'lng' => 118.46,
  502. 'lat' => 39.2731
  503. ],
  504. [
  505. 'area_id' => 130223,
  506. 'area_pid' => 130200,
  507. 'area_name' => '滦县',
  508. 'lng' => 118.703,
  509. 'lat' => 39.7406
  510. ],
  511. [
  512. 'area_id' => 130224,
  513. 'area_pid' => 130200,
  514. 'area_name' => '滦南县',
  515. 'lng' => 118.674,
  516. 'lat' => 39.5039
  517. ],
  518. [
  519. 'area_id' => 130225,
  520. 'area_pid' => 130200,
  521. 'area_name' => '乐亭县',
  522. 'lng' => 118.912,
  523. 'lat' => 39.4256
  524. ],
  525. [
  526. 'area_id' => 130227,
  527. 'area_pid' => 130200,
  528. 'area_name' => '迁西县',
  529. 'lng' => 118.316,
  530. 'lat' => 40.1459
  531. ],
  532. [
  533. 'area_id' => 130229,
  534. 'area_pid' => 130200,
  535. 'area_name' => '玉田县',
  536. 'lng' => 117.739,
  537. 'lat' => 39.9005
  538. ],
  539. [
  540. 'area_id' => 130281,
  541. 'area_pid' => 130200,
  542. 'area_name' => '遵化市',
  543. 'lng' => 117.964,
  544. 'lat' => 40.1874
  545. ],
  546. [
  547. 'area_id' => 130283,
  548. 'area_pid' => 130200,
  549. 'area_name' => '迁安市',
  550. 'lng' => 118.701,
  551. 'lat' => 39.9983
  552. ]
  553. ]
  554. ],
  555. [
  556. 'area_id' => 130300,
  557. 'area_pid' => 130000,
  558. 'area_name' => '秦皇岛市',
  559. 'lng' => 119.587,
  560. 'lat' => 39.9425,
  561. 'son' => [
  562. [
  563. 'area_id' => 130302,
  564. 'area_pid' => 130300,
  565. 'area_name' => '海港区',
  566. 'lng' => 119.61,
  567. 'lat' => 39.9345
  568. ],
  569. [
  570. 'area_id' => 130303,
  571. 'area_pid' => 130300,
  572. 'area_name' => '山海关区',
  573. 'lng' => 119.776,
  574. 'lat' => 39.9787
  575. ],
  576. [
  577. 'area_id' => 130304,
  578. 'area_pid' => 130300,
  579. 'area_name' => '北戴河区',
  580. 'lng' => 119.484,
  581. 'lat' => 39.8341
  582. ],
  583. [
  584. 'area_id' => 130321,
  585. 'area_pid' => 130300,
  586. 'area_name' => '青龙满族自治县',
  587. 'lng' => 118.952,
  588. 'lat' => 40.4074
  589. ],
  590. [
  591. 'area_id' => 130322,
  592. 'area_pid' => 130300,
  593. 'area_name' => '昌黎县',
  594. 'lng' => 119.166,
  595. 'lat' => 39.7088
  596. ],
  597. [
  598. 'area_id' => 130323,
  599. 'area_pid' => 130300,
  600. 'area_name' => '抚宁县',
  601. 'lng' => 119.245,
  602. 'lat' => 39.8754
  603. ],
  604. [
  605. 'area_id' => 130324,
  606. 'area_pid' => 130300,
  607. 'area_name' => '卢龙县',
  608. 'lng' => 118.893,
  609. 'lat' => 39.8918
  610. ]
  611. ]
  612. ],
  613. [
  614. 'area_id' => 130400,
  615. 'area_pid' => 130000,
  616. 'area_name' => '邯郸市',
  617. 'lng' => 114.491,
  618. 'lat' => 36.6123,
  619. 'son' => [
  620. [
  621. 'area_id' => 130402,
  622. 'area_pid' => 130400,
  623. 'area_name' => '邯山区',
  624. 'lng' => 114.484,
  625. 'lat' => 36.6001
  626. ],
  627. [
  628. 'area_id' => 130403,
  629. 'area_pid' => 130400,
  630. 'area_name' => '丛台区',
  631. 'lng' => 114.493,
  632. 'lat' => 36.6185
  633. ],
  634. [
  635. 'area_id' => 130404,
  636. 'area_pid' => 130400,
  637. 'area_name' => '复兴区',
  638. 'lng' => 114.459,
  639. 'lat' => 36.6113
  640. ],
  641. [
  642. 'area_id' => 130406,
  643. 'area_pid' => 130400,
  644. 'area_name' => '峰峰矿区',
  645. 'lng' => 114.211,
  646. 'lat' => 36.4194
  647. ],
  648. [
  649. 'area_id' => 130421,
  650. 'area_pid' => 130400,
  651. 'area_name' => '邯郸县',
  652. 'lng' => 114.531,
  653. 'lat' => 36.5938
  654. ],
  655. [
  656. 'area_id' => 130423,
  657. 'area_pid' => 130400,
  658. 'area_name' => '临漳县',
  659. 'lng' => 114.619,
  660. 'lat' => 36.3346
  661. ],
  662. [
  663. 'area_id' => 130424,
  664. 'area_pid' => 130400,
  665. 'area_name' => '成安县',
  666. 'lng' => 114.67,
  667. 'lat' => 36.4441
  668. ],
  669. [
  670. 'area_id' => 130425,
  671. 'area_pid' => 130400,
  672. 'area_name' => '大名县',
  673. 'lng' => 115.154,
  674. 'lat' => 36.2799
  675. ],
  676. [
  677. 'area_id' => 130426,
  678. 'area_pid' => 130400,
  679. 'area_name' => '涉县',
  680. 'lng' => 113.692,
  681. 'lat' => 36.5807
  682. ],
  683. [
  684. 'area_id' => 130427,
  685. 'area_pid' => 130400,
  686. 'area_name' => '磁县',
  687. 'lng' => 114.374,
  688. 'lat' => 36.3739
  689. ],
  690. [
  691. 'area_id' => 130428,
  692. 'area_pid' => 130400,
  693. 'area_name' => '肥乡县',
  694. 'lng' => 114.8,
  695. 'lat' => 36.5481
  696. ],
  697. [
  698. 'area_id' => 130429,
  699. 'area_pid' => 130400,
  700. 'area_name' => '永年县',
  701. 'lng' => 114.489,
  702. 'lat' => 36.7836
  703. ],
  704. [
  705. 'area_id' => 130430,
  706. 'area_pid' => 130400,
  707. 'area_name' => '邱县',
  708. 'lng' => 115.174,
  709. 'lat' => 36.8208
  710. ],
  711. [
  712. 'area_id' => 130431,
  713. 'area_pid' => 130400,
  714. 'area_name' => '鸡泽县',
  715. 'lng' => 114.874,
  716. 'lat' => 36.9237
  717. ],
  718. [
  719. 'area_id' => 130432,
  720. 'area_pid' => 130400,
  721. 'area_name' => '广平县',
  722. 'lng' => 114.947,
  723. 'lat' => 36.4805
  724. ],
  725. [
  726. 'area_id' => 130433,
  727. 'area_pid' => 130400,
  728. 'area_name' => '馆陶县',
  729. 'lng' => 115.299,
  730. 'lat' => 36.5372
  731. ],
  732. [
  733. 'area_id' => 130434,
  734. 'area_pid' => 130400,
  735. 'area_name' => '魏县',
  736. 'lng' => 114.935,
  737. 'lat' => 36.3617
  738. ],
  739. [
  740. 'area_id' => 130435,
  741. 'area_pid' => 130400,
  742. 'area_name' => '曲周县',
  743. 'lng' => 114.952,
  744. 'lat' => 36.7767
  745. ],
  746. [
  747. 'area_id' => 130481,
  748. 'area_pid' => 130400,
  749. 'area_name' => '武安市',
  750. 'lng' => 114.202,
  751. 'lat' => 36.6928
  752. ]
  753. ]
  754. ],
  755. [
  756. 'area_id' => 130500,
  757. 'area_pid' => 130000,
  758. 'area_name' => '邢台市',
  759. 'lng' => 114.509,
  760. 'lat' => 37.0682,
  761. 'son' => [
  762. [
  763. 'area_id' => 130502,
  764. 'area_pid' => 130500,
  765. 'area_name' => '桥东区',
  766. 'lng' => 114.507,
  767. 'lat' => 37.068
  768. ],
  769. [
  770. 'area_id' => 130503,
  771. 'area_pid' => 130500,
  772. 'area_name' => '桥西区',
  773. 'lng' => 114.468,
  774. 'lat' => 37.0598
  775. ],
  776. [
  777. 'area_id' => 130521,
  778. 'area_pid' => 130500,
  779. 'area_name' => '邢台县',
  780. 'lng' => 114.566,
  781. 'lat' => 37.0456
  782. ],
  783. [
  784. 'area_id' => 130522,
  785. 'area_pid' => 130500,
  786. 'area_name' => '临城县',
  787. 'lng' => 114.504,
  788. 'lat' => 37.4398
  789. ],
  790. [
  791. 'area_id' => 130523,
  792. 'area_pid' => 130500,
  793. 'area_name' => '内丘县',
  794. 'lng' => 114.512,
  795. 'lat' => 37.2867
  796. ],
  797. [
  798. 'area_id' => 130524,
  799. 'area_pid' => 130500,
  800. 'area_name' => '柏乡县',
  801. 'lng' => 114.693,
  802. 'lat' => 37.4824
  803. ],
  804. [
  805. 'area_id' => 130525,
  806. 'area_pid' => 130500,
  807. 'area_name' => '隆尧县',
  808. 'lng' => 114.776,
  809. 'lat' => 37.3535
  810. ],
  811. [
  812. 'area_id' => 130526,
  813. 'area_pid' => 130500,
  814. 'area_name' => '任县',
  815. 'lng' => 114.684,
  816. 'lat' => 37.1258
  817. ],
  818. [
  819. 'area_id' => 130527,
  820. 'area_pid' => 130500,
  821. 'area_name' => '南和县',
  822. 'lng' => 114.684,
  823. 'lat' => 37.0049
  824. ],
  825. [
  826. 'area_id' => 130528,
  827. 'area_pid' => 130500,
  828. 'area_name' => '宁晋县',
  829. 'lng' => 114.921,
  830. 'lat' => 37.617
  831. ],
  832. [
  833. 'area_id' => 130529,
  834. 'area_pid' => 130500,
  835. 'area_name' => '巨鹿县',
  836. 'lng' => 115.035,
  837. 'lat' => 37.218
  838. ],
  839. [
  840. 'area_id' => 130530,
  841. 'area_pid' => 130500,
  842. 'area_name' => '新河县',
  843. 'lng' => 115.25,
  844. 'lat' => 37.5272
  845. ],
  846. [
  847. 'area_id' => 130531,
  848. 'area_pid' => 130500,
  849. 'area_name' => '广宗县',
  850. 'lng' => 115.143,
  851. 'lat' => 37.0746
  852. ],
  853. [
  854. 'area_id' => 130532,
  855. 'area_pid' => 130500,
  856. 'area_name' => '平乡县',
  857. 'lng' => 115.03,
  858. 'lat' => 37.0632
  859. ],
  860. [
  861. 'area_id' => 130533,
  862. 'area_pid' => 130500,
  863. 'area_name' => '威县',
  864. 'lng' => 115.264,
  865. 'lat' => 36.9768
  866. ],
  867. [
  868. 'area_id' => 130534,
  869. 'area_pid' => 130500,
  870. 'area_name' => '清河县',
  871. 'lng' => 115.665,
  872. 'lat' => 37.0712
  873. ],
  874. [
  875. 'area_id' => 130535,
  876. 'area_pid' => 130500,
  877. 'area_name' => '临西县',
  878. 'lng' => 115.501,
  879. 'lat' => 36.8708
  880. ],
  881. [
  882. 'area_id' => 130581,
  883. 'area_pid' => 130500,
  884. 'area_name' => '南宫市',
  885. 'lng' => 115.391,
  886. 'lat' => 37.358
  887. ],
  888. [
  889. 'area_id' => 130582,
  890. 'area_pid' => 130500,
  891. 'area_name' => '沙河市',
  892. 'lng' => 114.498,
  893. 'lat' => 36.8577
  894. ]
  895. ]
  896. ],
  897. [
  898. 'area_id' => 130600,
  899. 'area_pid' => 130000,
  900. 'area_name' => '保定市',
  901. 'lng' => 115.482,
  902. 'lat' => 38.8677,
  903. 'son' => [
  904. [
  905. 'area_id' => 130602,
  906. 'area_pid' => 130600,
  907. 'area_name' => '新市区',
  908. 'lng' => 115.459,
  909. 'lat' => 38.8775
  910. ],
  911. [
  912. 'area_id' => 130603,
  913. 'area_pid' => 130600,
  914. 'area_name' => '北市区',
  915. 'lng' => 115.497,
  916. 'lat' => 38.8832
  917. ],
  918. [
  919. 'area_id' => 130604,
  920. 'area_pid' => 130600,
  921. 'area_name' => '南市区',
  922. 'lng' => 115.529,
  923. 'lat' => 38.8545
  924. ],
  925. [
  926. 'area_id' => 130621,
  927. 'area_pid' => 130600,
  928. 'area_name' => '满城县',
  929. 'lng' => 115.323,
  930. 'lat' => 38.9497
  931. ],
  932. [
  933. 'area_id' => 130622,
  934. 'area_pid' => 130600,
  935. 'area_name' => '清苑县',
  936. 'lng' => 115.493,
  937. 'lat' => 38.7671
  938. ],
  939. [
  940. 'area_id' => 130623,
  941. 'area_pid' => 130600,
  942. 'area_name' => '涞水县',
  943. 'lng' => 115.715,
  944. 'lat' => 39.394
  945. ],
  946. [
  947. 'area_id' => 130624,
  948. 'area_pid' => 130600,
  949. 'area_name' => '阜平县',
  950. 'lng' => 114.197,
  951. 'lat' => 38.8476
  952. ],
  953. [
  954. 'area_id' => 130625,
  955. 'area_pid' => 130600,
  956. 'area_name' => '徐水县',
  957. 'lng' => 115.658,
  958. 'lat' => 39.021
  959. ],
  960. [
  961. 'area_id' => 130626,
  962. 'area_pid' => 130600,
  963. 'area_name' => '定兴县',
  964. 'lng' => 115.808,
  965. 'lat' => 39.2631
  966. ],
  967. [
  968. 'area_id' => 130627,
  969. 'area_pid' => 130600,
  970. 'area_name' => '唐县',
  971. 'lng' => 114.985,
  972. 'lat' => 38.7451
  973. ],
  974. [
  975. 'area_id' => 130628,
  976. 'area_pid' => 130600,
  977. 'area_name' => '高阳县',
  978. 'lng' => 115.779,
  979. 'lat' => 38.7
  980. ],
  981. [
  982. 'area_id' => 130629,
  983. 'area_pid' => 130600,
  984. 'area_name' => '容城县',
  985. 'lng' => 115.872,
  986. 'lat' => 39.0535
  987. ],
  988. [
  989. 'area_id' => 130630,
  990. 'area_pid' => 130600,
  991. 'area_name' => '涞源县',
  992. 'lng' => 114.691,
  993. 'lat' => 39.3539
  994. ],
  995. [
  996. 'area_id' => 130631,
  997. 'area_pid' => 130600,
  998. 'area_name' => '望都县',
  999. 'lng' => 115.157,
  1000. 'lat' => 38.71
  1001. ],
  1002. [
  1003. 'area_id' => 130632,
  1004. 'area_pid' => 130600,
  1005. 'area_name' => '安新县',
  1006. 'lng' => 115.936,
  1007. 'lat' => 38.9353
  1008. ],
  1009. [
  1010. 'area_id' => 130633,
  1011. 'area_pid' => 130600,
  1012. 'area_name' => '易县',
  1013. 'lng' => 115.498,
  1014. 'lat' => 39.3489
  1015. ],
  1016. [
  1017. 'area_id' => 130634,
  1018. 'area_pid' => 130600,
  1019. 'area_name' => '曲阳县',
  1020. 'lng' => 114.701,
  1021. 'lat' => 38.6215
  1022. ],
  1023. [
  1024. 'area_id' => 130635,
  1025. 'area_pid' => 130600,
  1026. 'area_name' => '蠡县',
  1027. 'lng' => 115.577,
  1028. 'lat' => 38.4897
  1029. ],
  1030. [
  1031. 'area_id' => 130636,
  1032. 'area_pid' => 130600,
  1033. 'area_name' => '顺平县',
  1034. 'lng' => 115.135,
  1035. 'lat' => 38.8385
  1036. ],
  1037. [
  1038. 'area_id' => 130637,
  1039. 'area_pid' => 130600,
  1040. 'area_name' => '博野县',
  1041. 'lng' => 115.47,
  1042. 'lat' => 38.4564
  1043. ],
  1044. [
  1045. 'area_id' => 130638,
  1046. 'area_pid' => 130600,
  1047. 'area_name' => '雄县',
  1048. 'lng' => 116.109,
  1049. 'lat' => 38.9944
  1050. ],
  1051. [
  1052. 'area_id' => 130681,
  1053. 'area_pid' => 130600,
  1054. 'area_name' => '涿州市',
  1055. 'lng' => 115.981,
  1056. 'lat' => 39.4862
  1057. ],
  1058. [
  1059. 'area_id' => 130682,
  1060. 'area_pid' => 130600,
  1061. 'area_name' => '定州市',
  1062. 'lng' => 114.99,
  1063. 'lat' => 38.5162
  1064. ],
  1065. [
  1066. 'area_id' => 130683,
  1067. 'area_pid' => 130600,
  1068. 'area_name' => '安国市',
  1069. 'lng' => 115.323,
  1070. 'lat' => 38.4139
  1071. ],
  1072. [
  1073. 'area_id' => 130684,
  1074. 'area_pid' => 130600,
  1075. 'area_name' => '高碑店市',
  1076. 'lng' => 115.874,
  1077. 'lat' => 39.3265
  1078. ]
  1079. ]
  1080. ],
  1081. [
  1082. 'area_id' => 130700,
  1083. 'area_pid' => 130000,
  1084. 'area_name' => '张家口市',
  1085. 'lng' => 114.884,
  1086. 'lat' => 40.8119,
  1087. 'son' => [
  1088. [
  1089. 'area_id' => 130702,
  1090. 'area_pid' => 130700,
  1091. 'area_name' => '桥东区',
  1092. 'lng' => 114.894,
  1093. 'lat' => 40.7884
  1094. ],
  1095. [
  1096. 'area_id' => 130703,
  1097. 'area_pid' => 130700,
  1098. 'area_name' => '桥西区',
  1099. 'lng' => 114.87,
  1100. 'lat' => 40.8195
  1101. ],
  1102. [
  1103. 'area_id' => 130705,
  1104. 'area_pid' => 130700,
  1105. 'area_name' => '宣化区',
  1106. 'lng' => 115.065,
  1107. 'lat' => 40.6096
  1108. ],
  1109. [
  1110. 'area_id' => 130706,
  1111. 'area_pid' => 130700,
  1112. 'area_name' => '下花园区',
  1113. 'lng' => 115.287,
  1114. 'lat' => 40.5024
  1115. ],
  1116. [
  1117. 'area_id' => 130721,
  1118. 'area_pid' => 130700,
  1119. 'area_name' => '宣化县',
  1120. 'lng' => 115.155,
  1121. 'lat' => 40.5662
  1122. ],
  1123. [
  1124. 'area_id' => 130722,
  1125. 'area_pid' => 130700,
  1126. 'area_name' => '张北县',
  1127. 'lng' => 114.714,
  1128. 'lat' => 41.1598
  1129. ],
  1130. [
  1131. 'area_id' => 130723,
  1132. 'area_pid' => 130700,
  1133. 'area_name' => '康保县',
  1134. 'lng' => 114.6,
  1135. 'lat' => 41.8522
  1136. ],
  1137. [
  1138. 'area_id' => 130724,
  1139. 'area_pid' => 130700,
  1140. 'area_name' => '沽源县',
  1141. 'lng' => 115.689,
  1142. 'lat' => 41.6696
  1143. ],
  1144. [
  1145. 'area_id' => 130725,
  1146. 'area_pid' => 130700,
  1147. 'area_name' => '尚义县',
  1148. 'lng' => 113.971,
  1149. 'lat' => 41.0778
  1150. ],
  1151. [
  1152. 'area_id' => 130726,
  1153. 'area_pid' => 130700,
  1154. 'area_name' => '蔚县',
  1155. 'lng' => 114.589,
  1156. 'lat' => 39.8407
  1157. ],
  1158. [
  1159. 'area_id' => 130727,
  1160. 'area_pid' => 130700,
  1161. 'area_name' => '阳原县',
  1162. 'lng' => 114.151,
  1163. 'lat' => 40.1036
  1164. ],
  1165. [
  1166. 'area_id' => 130728,
  1167. 'area_pid' => 130700,
  1168. 'area_name' => '怀安县',
  1169. 'lng' => 114.386,
  1170. 'lat' => 40.6743
  1171. ],
  1172. [
  1173. 'area_id' => 130729,
  1174. 'area_pid' => 130700,
  1175. 'area_name' => '万全县',
  1176. 'lng' => 114.741,
  1177. 'lat' => 40.7669
  1178. ],
  1179. [
  1180. 'area_id' => 130730,
  1181. 'area_pid' => 130700,
  1182. 'area_name' => '怀来县',
  1183. 'lng' => 115.518,
  1184. 'lat' => 40.4154
  1185. ],
  1186. [
  1187. 'area_id' => 130731,
  1188. 'area_pid' => 130700,
  1189. 'area_name' => '涿鹿县',
  1190. 'lng' => 115.224,
  1191. 'lat' => 40.3764
  1192. ],
  1193. [
  1194. 'area_id' => 130732,
  1195. 'area_pid' => 130700,
  1196. 'area_name' => '赤城县',
  1197. 'lng' => 115.832,
  1198. 'lat' => 40.9144
  1199. ],
  1200. [
  1201. 'area_id' => 130733,
  1202. 'area_pid' => 130700,
  1203. 'area_name' => '崇礼县',
  1204. 'lng' => 115.28,
  1205. 'lat' => 40.9752
  1206. ]
  1207. ]
  1208. ],
  1209. [
  1210. 'area_id' => 130800,
  1211. 'area_pid' => 130000,
  1212. 'area_name' => '承德市',
  1213. 'lng' => 117.939,
  1214. 'lat' => 40.9762,
  1215. 'son' => [
  1216. [
  1217. 'area_id' => 130802,
  1218. 'area_pid' => 130800,
  1219. 'area_name' => '双桥区',
  1220. 'lng' => 117.943,
  1221. 'lat' => 40.9747
  1222. ],
  1223. [
  1224. 'area_id' => 130803,
  1225. 'area_pid' => 130800,
  1226. 'area_name' => '双滦区',
  1227. 'lng' => 117.745,
  1228. 'lat' => 40.9538
  1229. ],
  1230. [
  1231. 'area_id' => 130804,
  1232. 'area_pid' => 130800,
  1233. 'area_name' => '鹰手营子矿区',
  1234. 'lng' => 117.66,
  1235. 'lat' => 40.5474
  1236. ],
  1237. [
  1238. 'area_id' => 130821,
  1239. 'area_pid' => 130800,
  1240. 'area_name' => '承德县',
  1241. 'lng' => 118.176,
  1242. 'lat' => 40.7699
  1243. ],
  1244. [
  1245. 'area_id' => 130822,
  1246. 'area_pid' => 130800,
  1247. 'area_name' => '兴隆县',
  1248. 'lng' => 117.501,
  1249. 'lat' => 40.4171
  1250. ],
  1251. [
  1252. 'area_id' => 130823,
  1253. 'area_pid' => 130800,
  1254. 'area_name' => '平泉县',
  1255. 'lng' => 118.702,
  1256. 'lat' => 41.0184
  1257. ],
  1258. [
  1259. 'area_id' => 130824,
  1260. 'area_pid' => 130800,
  1261. 'area_name' => '滦平县',
  1262. 'lng' => 117.333,
  1263. 'lat' => 40.9415
  1264. ],
  1265. [
  1266. 'area_id' => 130825,
  1267. 'area_pid' => 130800,
  1268. 'area_name' => '隆化县',
  1269. 'lng' => 117.73,
  1270. 'lat' => 41.3141
  1271. ],
  1272. [
  1273. 'area_id' => 130826,
  1274. 'area_pid' => 130800,
  1275. 'area_name' => '丰宁满族自治县',
  1276. 'lng' => 116.649,
  1277. 'lat' => 41.2048
  1278. ],
  1279. [
  1280. 'area_id' => 130827,
  1281. 'area_pid' => 130800,
  1282. 'area_name' => '宽城满族自治县',
  1283. 'lng' => 118.492,
  1284. 'lat' => 40.6083
  1285. ],
  1286. [
  1287. 'area_id' => 130828,
  1288. 'area_pid' => 130800,
  1289. 'area_name' => '围场满族蒙古族自治县',
  1290. 'lng' => 117.76,
  1291. 'lat' => 41.9437
  1292. ]
  1293. ]
  1294. ],
  1295. [
  1296. 'area_id' => 130900,
  1297. 'area_pid' => 130000,
  1298. 'area_name' => '沧州市',
  1299. 'lng' => 116.857,
  1300. 'lat' => 38.3106,
  1301. 'son' => [
  1302. [
  1303. 'area_id' => 130902,
  1304. 'area_pid' => 130900,
  1305. 'area_name' => '新华区',
  1306. 'lng' => 116.866,
  1307. 'lat' => 38.3144
  1308. ],
  1309. [
  1310. 'area_id' => 130903,
  1311. 'area_pid' => 130900,
  1312. 'area_name' => '运河区',
  1313. 'lng' => 116.857,
  1314. 'lat' => 38.3135
  1315. ],
  1316. [
  1317. 'area_id' => 130921,
  1318. 'area_pid' => 130900,
  1319. 'area_name' => '沧县',
  1320. 'lng' => 116.878,
  1321. 'lat' => 38.2936
  1322. ],
  1323. [
  1324. 'area_id' => 130922,
  1325. 'area_pid' => 130900,
  1326. 'area_name' => '青县',
  1327. 'lng' => 116.803,
  1328. 'lat' => 38.5835
  1329. ],
  1330. [
  1331. 'area_id' => 130923,
  1332. 'area_pid' => 130900,
  1333. 'area_name' => '东光县',
  1334. 'lng' => 116.537,
  1335. 'lat' => 37.8857
  1336. ],
  1337. [
  1338. 'area_id' => 130924,
  1339. 'area_pid' => 130900,
  1340. 'area_name' => '海兴县',
  1341. 'lng' => 117.498,
  1342. 'lat' => 38.1396
  1343. ],
  1344. [
  1345. 'area_id' => 130925,
  1346. 'area_pid' => 130900,
  1347. 'area_name' => '盐山县',
  1348. 'lng' => 117.231,
  1349. 'lat' => 38.0565
  1350. ],
  1351. [
  1352. 'area_id' => 130926,
  1353. 'area_pid' => 130900,
  1354. 'area_name' => '肃宁县',
  1355. 'lng' => 115.83,
  1356. 'lat' => 38.4227
  1357. ],
  1358. [
  1359. 'area_id' => 130927,
  1360. 'area_pid' => 130900,
  1361. 'area_name' => '南皮县',
  1362. 'lng' => 116.702,
  1363. 'lat' => 38.0411
  1364. ],
  1365. [
  1366. 'area_id' => 130928,
  1367. 'area_pid' => 130900,
  1368. 'area_name' => '吴桥县',
  1369. 'lng' => 116.385,
  1370. 'lat' => 37.6255
  1371. ],
  1372. [
  1373. 'area_id' => 130929,
  1374. 'area_pid' => 130900,
  1375. 'area_name' => '献县',
  1376. 'lng' => 116.127,
  1377. 'lat' => 38.1923
  1378. ],
  1379. [
  1380. 'area_id' => 130930,
  1381. 'area_pid' => 130900,
  1382. 'area_name' => '孟村回族自治县',
  1383. 'lng' => 117.104,
  1384. 'lat' => 38.0534
  1385. ],
  1386. [
  1387. 'area_id' => 130981,
  1388. 'area_pid' => 130900,
  1389. 'area_name' => '泊头市',
  1390. 'lng' => 116.578,
  1391. 'lat' => 38.0836
  1392. ],
  1393. [
  1394. 'area_id' => 130982,
  1395. 'area_pid' => 130900,
  1396. 'area_name' => '任丘市',
  1397. 'lng' => 116.103,
  1398. 'lat' => 38.7112
  1399. ],
  1400. [
  1401. 'area_id' => 130983,
  1402. 'area_pid' => 130900,
  1403. 'area_name' => '黄骅市',
  1404. 'lng' => 117.339,
  1405. 'lat' => 38.3706
  1406. ],
  1407. [
  1408. 'area_id' => 130984,
  1409. 'area_pid' => 130900,
  1410. 'area_name' => '河间市',
  1411. 'lng' => 116.099,
  1412. 'lat' => 38.4455
  1413. ]
  1414. ]
  1415. ],
  1416. [
  1417. 'area_id' => 131000,
  1418. 'area_pid' => 130000,
  1419. 'area_name' => '廊坊市',
  1420. 'lng' => 116.714,
  1421. 'lat' => 39.5292,
  1422. 'son' => [
  1423. [
  1424. 'area_id' => 131002,
  1425. 'area_pid' => 131000,
  1426. 'area_name' => '安次区',
  1427. 'lng' => 116.703,
  1428. 'lat' => 39.5206
  1429. ],
  1430. [
  1431. 'area_id' => 131003,
  1432. 'area_pid' => 131000,
  1433. 'area_name' => '广阳区',
  1434. 'lng' => 116.711,
  1435. 'lat' => 39.5228
  1436. ],
  1437. [
  1438. 'area_id' => 131022,
  1439. 'area_pid' => 131000,
  1440. 'area_name' => '固安县',
  1441. 'lng' => 116.299,
  1442. 'lat' => 39.4383
  1443. ],
  1444. [
  1445. 'area_id' => 131023,
  1446. 'area_pid' => 131000,
  1447. 'area_name' => '永清县',
  1448. 'lng' => 116.501,
  1449. 'lat' => 39.3207
  1450. ],
  1451. [
  1452. 'area_id' => 131024,
  1453. 'area_pid' => 131000,
  1454. 'area_name' => '香河县',
  1455. 'lng' => 117.006,
  1456. 'lat' => 39.7613
  1457. ],
  1458. [
  1459. 'area_id' => 131025,
  1460. 'area_pid' => 131000,
  1461. 'area_name' => '大城县',
  1462. 'lng' => 116.654,
  1463. 'lat' => 38.7053
  1464. ],
  1465. [
  1466. 'area_id' => 131026,
  1467. 'area_pid' => 131000,
  1468. 'area_name' => '文安县',
  1469. 'lng' => 116.458,
  1470. 'lat' => 38.8732
  1471. ],
  1472. [
  1473. 'area_id' => 131028,
  1474. 'area_pid' => 131000,
  1475. 'area_name' => '大厂回族自治县',
  1476. 'lng' => 116.989,
  1477. 'lat' => 39.8865
  1478. ],
  1479. [
  1480. 'area_id' => 131081,
  1481. 'area_pid' => 131000,
  1482. 'area_name' => '霸州市',
  1483. 'lng' => 116.392,
  1484. 'lat' => 39.1257
  1485. ],
  1486. [
  1487. 'area_id' => 131082,
  1488. 'area_pid' => 131000,
  1489. 'area_name' => '三河市',
  1490. 'lng' => 117.072,
  1491. 'lat' => 39.9836
  1492. ]
  1493. ]
  1494. ],
  1495. [
  1496. 'area_id' => 131100,
  1497. 'area_pid' => 130000,
  1498. 'area_name' => '衡水市',
  1499. 'lng' => 115.666,
  1500. 'lat' => 37.7351,
  1501. 'son' => [
  1502. [
  1503. 'area_id' => 131102,
  1504. 'area_pid' => 131100,
  1505. 'area_name' => '桃城区',
  1506. 'lng' => 115.675,
  1507. 'lat' => 37.735,
  1508. ],
  1509. [
  1510. 'area_id' => 131121,
  1511. 'area_pid' => 131100,
  1512. 'area_name' => '枣强县',
  1513. 'lng' => 115.726,
  1514. 'lat' => 37.5103
  1515. ],
  1516. [
  1517. 'area_id' => 131122,
  1518. 'area_pid' => 131100,
  1519. 'area_name' => '武邑县',
  1520. 'lng' => 115.887,
  1521. 'lat' => 37.8018
  1522. ],
  1523. [
  1524. 'area_id' => 131123,
  1525. 'area_pid' => 131100,
  1526. 'area_name' => '武强县',
  1527. 'lng' => 115.982,
  1528. 'lat' => 38.0414
  1529. ],
  1530. [
  1531. 'area_id' => 131124,
  1532. 'area_pid' => 131100,
  1533. 'area_name' => '饶阳县',
  1534. 'lng' => 115.726,
  1535. 'lat' => 38.2353
  1536. ],
  1537. [
  1538. 'area_id' => 131125,
  1539. 'area_pid' => 131100,
  1540. 'area_name' => '安平县',
  1541. 'lng' => 115.519,
  1542. 'lat' => 38.2339
  1543. ],
  1544. [
  1545. 'area_id' => 131126,
  1546. 'area_pid' => 131100,
  1547. 'area_name' => '故城县',
  1548. 'lng' => 115.971,
  1549. 'lat' => 37.3477
  1550. ],
  1551. [
  1552. 'area_id' => 131127,
  1553. 'area_pid' => 131100,
  1554. 'area_name' => '景县',
  1555. 'lng' => 116.269,
  1556. 'lat' => 37.6926
  1557. ],
  1558. [
  1559. 'area_id' => 131128,
  1560. 'area_pid' => 131100,
  1561. 'area_name' => '阜城县',
  1562. 'lng' => 116.144,
  1563. 'lat' => 37.8688
  1564. ],
  1565. [
  1566. 'area_id' => 131181,
  1567. 'area_pid' => 131100,
  1568. 'area_name' => '冀州市',
  1569. 'lng' => 115.579,
  1570. 'lat' => 37.5508
  1571. ],
  1572. [
  1573. 'area_id' => 131182,
  1574. 'area_pid' => 131100,
  1575. 'area_name' => '深州市',
  1576. 'lng' => 115.56,
  1577. 'lat' => 38.0011
  1578. ]
  1579. ]
  1580. ]
  1581. ]
  1582. ]
  1583. ];
  1584. ?>
  1585. <?php
  1586. //输出多个空格
  1587. $txt=" ";
  1588. $space = str_replace(chr(32),'&nbsp;',$txt);
  1589. //输出省的名字
  1590. foreach ($arr as $key => $value) {
  1591. echo $value['area_name']."<br>";
  1592. //输出市的名字
  1593. foreach ($value['son'] as $k => $v) {
  1594. echo $space.$v['area_name']."<br>";
  1595. //输出区或县的名字
  1596. foreach ($v['son'] as $k1 => $v1) {
  1597. echo $space.$space.$v1['area_name']."<br>";
  1598. }
  1599. }
  1600. }
  1601. ?>
  1602. </body>
  1603. </html>

打印其中一个城市的数据

  1. <?php
  2. // 打印第三组数据
  3. echo "<form action=''><label for='province'>省份:</label><select name='province' id='province'>";
  4. // 输出省份
  5. foreach ($arr as $key => $province)
  6. if ($province["area_id"] === $arr[1]["area_id"]){
  7. echo "<option value='{$province["area_id"]}'>{$province["area_name"]}</option>";
  8. }
  9. echo "</select>";
  10. echo "<label for='city'>城市:</label><select name='city' id='city'>";
  11. // 输出城市
  12. foreach ($arr as $key_one => $province) {
  13. foreach ($province['son'] as $key_two => $city) {
  14. if ($city["area_pid"] === $arr[1]["area_id"]) {
  15. echo "<option value='{$city["area_id"]}'>{$city["area_name"]}</option>";
  16. }
  17. }
  18. }
  19. echo "</select>";
  20. echo "<label for='area'>市区:</label><select name='area' id='area'>";
  21. // 输出市区
  22. foreach ($arr as $key_one => $province) {
  23. foreach ($province['son'] as $key_two => $city) {
  24. foreach ($city['son'] as $key_three => $area) {
  25. if ($city["area_pid"] === $arr[1]["area_id"]) {
  26. echo "<option value='{$area["area_id"]}'>{$area["area_name"]}</option>";
  27. }
  28. }
  29. }
  30. }
  31. echo "</select>";
  32. echo "</form>";
  33. ?>

声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议