PHP入門–連想配列の追加方法
1.+演算子
$arrbh = array('key1’=>’value1’);
$arrbh = $arrbh + array('key2’=>’value2’);
var_dump($arrbh);
2.array_merge
$arrgk = array('key1’=>’value1’);
$arrgk = array_merge($arrgk,array('key2’=>’value2’));
var_dump($arrgk);
3.[]を使う
$qt = array('key1’=>’value1’);
$qt['key2’] = 'value2’;
var_dump($qt);