$res1 = array(); $get_mapped_array = array(); $mapping_value = ''; $import_obj = new WPImporter_includes_helper(); $filename = $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['uploadedFile']; $parserObj = new SmackCSVParser(); $file = $import_obj->getUploadDirectory() . '/' . $filename; $resultArr = $parserObj->parseCSV($file, $limit, $get_request_limit); if (sanitize_text_field($_POST['postdata']['dupTitle'])) { $importObj->titleDupCheck = sanitize_text_field($_POST['postdata']['dupTitle']); } if (sanitize_text_field($_POST['postdata']['dupContent'])) { $importObj->conDupCheck = sanitize_text_field($_POST['postdata']['dupContent']); } $csv_rec_count = $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['h2']; $available_groups = $skinnyObj->get_availgroups($curr_action); //mapped and unmapped count if (!empty($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']) && is_array($_SESSION['SMACK_MAPPING_SETTINGS_VALUES'])) { foreach ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES'] as $seskey => $sesval) { foreach ($available_groups as $groupKey => $groupVal) { $current_mapped = explode($groupVal . 'mapping', $seskey); if (is_array($current_mapped) && count($current_mapped) == 2) { $get_mapped_array['mapping' . $current_mapped[1]] = $sesval; if ($sesval == '-- Select --') { $res1[$seskey] = $sesval; } else { if ($sesval != '') { $res2[] = $sesval; } } }