'; // print_r($realiList['afterWidth']); // echo ''; // 'afterWidthById' 배열의 각 항목에서 'value'를 값으로, 'id'를 키로 재구성 $afterWidthById = array_column($lotData['afterWidth'], 'value', 'id'); // 동적으로 셔터수량등은 설정이 될 수 있으니 동적으로 적용하기 $columns = []; $innercount = 0; foreach ($afterWidthById as $key => $value) { // 키가 "col8_plus_"로 시작하는지 확인 if (preg_match('/^(col8_plus)_(\d+)$/', $key, $matches)) { $colName = $matches[1]; // 예: "col8_plus" $index = $matches[2]; // 인덱스 값 (문자열이지만 숫자로 취급 가능) $columns[$index][$colName] = $value; if ($innercount == 0) { $width = $value; } $innercount++; } } // echo '
'; // print_r($realiList['afterHeight']); // echo ''; // 'afterHeightById' 배열의 각 항목에서 'value'를 값으로, 'id'를 키로 재구성 $afterHeightById = array_column($lotData['afterHeight'], 'value', 'id'); // 두 번째 foreach에서는 $columns 배열을 다시 초기화하지 않도록 합니다. $innercount = 0; $columns = []; foreach ($afterHeightById as $key => $value) { // 키가 "col9_plus_"로 시작하는지 확인 if (preg_match('/^(col9_plus)_(\d+)$/', $key, $matches)) { $colName = $matches[1]; // 예: "col9_plus" $index = $matches[2]; // 인덱스 값 (문자열이지만 숫자로 취급 가능) $columns[$index][$colName] = $value; if ($innercount == 0) { $height = $value; } $innercount++; } } //2000*3000*0.84 mm 외 0개소 의 형태 만들기 $prodName = ""; // 상품명을 저장할 변수 // if문을 사용하여 제품 코드에 따른 상품명 설정 if ($prodCode == 'KSS01') { $prodName = '국민방화 스크린 셔터'; $arrayWidth = $screen_width[$page-1] ; $arrayHeight = $screen_height[$page-1] ; $thickness = '0.84'; } elseif ($prodCode == 'KSE01') { $prodName = '국민방화 스크린 셔터'; $arrayWidth = $screen_width[$page-1] ; $arrayHeight = $screen_height[$page-1] ; $thickness = '0.84'; } elseif ($prodCode == 'KWE01') { $prodName = '국민방화 스크린 플러스 셔터'; $arrayWidth = $screen_width[$page-1] ; $arrayHeight = $screen_height[$page-1] ; $thickness = '0.84'; } elseif ($prodCode == 'KD-SL60') { $prodName = '국민방화 스틸 셔터'; $arrayWidth = $slat_width[$page-1] ; $arrayHeight = $slat_height[$page-1] ; $thickness = '1.55'; } elseif ($prodCode == 'KTE01') { $prodName = '국민방화 스틸 셔터'; $arrayWidth = $slat_width[$page-1] ; $arrayHeight = $slat_height[$page-1] ; $thickness = '1.55'; } elseif ($prodCode == 'KQTS01') { $prodName = '국민방화 투시형 스틸 셔터'; $arrayWidth = $slat_width[$page-1] ; $arrayHeight = $slat_height[$page-1] ; $thickness = '1.55'; } else { $prodName = "유효하지 않은 제품 코드입니다."; } $pageWidth = $arrayWidth; $pageHeight = $arrayHeight; $contents = $width . '*' . $height . '*' . $thickness . ' mm'; $gaeso = $lotVolumn - 1; ?>