「php」配列キーを使うサンプル

構文
$key => $value
PHPコード

<?php
$cft = ['tokyo'=>110, 'kawsaki'=>111, 'oosaka'=>'123abc'];
foreach ( $cft as $key => $value) {
  echo $key .",". $value ."<br>\n";
}
?>

結果
tokyo,110
kawsaki,111
oosaka,123abc

PHP

Posted by arkgame