Home  >  Article  >  Backend Development  >  java软件工程师学php - 7. Map被称作关联数组

java软件工程师学php - 7. Map被称作关联数组

WBOY
WBOYOriginal
2016-06-13 13:11:52820browse

java程序员学php - 7. Map被称作关联数组
如:
  $map['BJ'] = 'Beijing';
  $map['SH'] = 'Shanghai';

遍历这个关联数组:
  foreach($map as $abbr=>$full_name){
      echo "$abbr is short for $full_name";
  }

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