Blogger Information
Blog 23
fans 0
comment 0
visits 18963
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
用foreach遍历省市区
手机用户1617360551
Original
817 people have browsed it

用foreach遍历省市区

  1. foreach($arr as $key=>$value){
  2. echo '<pre>';
  3. echo '***';
  4. print_r($value['area_pid']);
  5. print_r($value['area_name']);
  6. foreach($value['son'] as $key1=>$value1){
  7. echo '<pre>';
  8. echo '+++';
  9. print_r($value1['area_pid']);
  10. print_r($value1['area_name']);
  11. foreach($value1['son'] as $key2=>$value2){
  12. echo '<pre>';
  13. echo '---';
  14. print_r($value2['area_name']);
  15. }
  16. }
  17. }

Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:注意pre仅限于调试时使用
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post