以下の場合にはarray_merge()を使います
array1=(1,2,3) array2=(4,5,6) $array = array_merge($array1,$array2);
以下の場合には以下のように対応することで配列を追加することができます
// array("3LDK" => array(000000,00001,...,00005), "2LDK" => array(20000,20001,...,3005)) などのように部屋の間取りに対応する配列を作成する if($room_layout == "4K以上"){ $leased_rooms["4K以上"][] = $room_id; }elseif($room_layout == "3LDK"){ $leased_rooms["3LDK"][] = $room_id; }elseif($room_layout == "3DK"){ $leased_rooms["3DK"][] = $room_id; }elseif($room_layout == "3K"){ $leased_rooms["3K"][] = $room_id; }elseif($room_layout == "2LDK"){ $leased_rooms["2LDK"][] = $room_id; }elseif($room_layout == "2DK"){ $leased_rooms["2DK"][] = $room_id; }elseif($room_layout == "2K"){ $leased_rooms["2K"][] = $room_id; }elseif($room_layout == "1LDK"){ $leased_rooms["1LDK"][] = $room_id; }elseif($room_layout == "1DL"){ $leased_rooms["1DK"][] = $room_id; }elseif($room_layout == "1K"){ $leased_rooms["1K"][] = $room_id; }elseif($room_layout == "1R"){ $leased_rooms["1R"][] = $room_id; }else{ $leased_rooms["間取り希望なし"][] = $room_id; }