「PHP入門」連想配列のkey、valueを取得方法

1.連想配列のキーを取得
$city = array(“tokyo" => “111", “osaka" => “222", “yokohama" => “333", “kawasaki" => “444");
$keys = array_keys($city);
echo $keys;

2.連想配列の値を取得
$city = array(“tokyo" => “111", “osaka" => “222", “yokohama" => “333", “kawasaki" => “444");
$valueA = $city[“tokyo"];
$valueB = $city[“osaka"];

PHP

Posted by arkgame