よく忘れる。
こう。
こんな感じで作る。
$sampleArray = array(
'exampleKey' => 'exampleValue',
'****' => '*****',
'****' => '*****',
'****' => '*****',
︙
);特定keyのvalue取得はこう。
print $sampleArray['exampleKey'];keyを変数にすることもできる。
$targetKey = 'exampleKey';
print $sampleArray[$targetKey];そんな感じで。


コメント