From 341d71858c86ee86e165a24014abaadb1c0e817d Mon Sep 17 00:00:00 2001 From: "sanjeev.p" Date: Mon, 20 Sep 2021 10:54:06 +0530 Subject: [PATCH] key cahnges : ps --- .../helpers/readexceldata_helper.php | 45 +++++++++++++------ 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/api/application/helpers/readexceldata_helper.php b/api/application/helpers/readexceldata_helper.php index 35907f8f..a78bae5c 100644 --- a/api/application/helpers/readexceldata_helper.php +++ b/api/application/helpers/readexceldata_helper.php @@ -83,8 +83,26 @@ class readexceldata $pd_address = $CI->PD_Model->getPDAddress($pd_id); if(count($pd_address)){ $return_data['initiated_address'] = $pd_address[0]['addressline1'].', '.$pd_address[0]['city_name'].', '.$pd_address[0]['state_name'].' - '.$pd_address[0]['pincode']; } } - + } + // if($section_id == 1) + // { + //echo "line at 91";die(); + // if(!empty($return_data['borrower_details'])){ + // SELF::change_key($return_data['borrower_details'],'numbers_of_years_business_running','numbers_of_years_applicant_in_business'); + + // for($i=0;$i $arr) { @@ -520,17 +538,16 @@ class readexceldata return $company; } -// public static function change_key( $array, $old_key, $new_key) { -// echo "line at 545"; -// // print_r($array); -// if( ! array_key_exists( $old_key, $array[0] ) ) -// return $array; + public static function change_key( $array, $old_key, $new_key) { + echo "line at 545"; + if( ! array_key_exists( $old_key, $array[0] ) ) + return $array; -// print_r(array_keys($array[0])); -// // print_r($keys);die(); -// $keys[ array_search( $old_key, $keys ) ] = $new_key; -// print_r(array_combine( $keys, $array[0] )); -// // return array_combine( $keys, $array ); -// } + print_r(array_keys($array[0])); + // print_r($keys);die(); + $keys[ array_search( $old_key, $keys ) ] = $new_key; + print_r(array_combine( $keys, $array[0] )); + // return array_combine( $keys, $array ); + } } ?> \ No newline at end of file