📜  php for 循环数组 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:20.225000             🧑  作者: Mango

代码示例6
$arr = array(
  'key1' => 'val1',
  'key2' => 'val2',
  'key3' => 'val3'
);

foreach ($arr as $key => $val) {
  echo "$key => $val" . PHP_EOL;
}