key cahnges : ps
This commit is contained in:
parent
88c3a64950
commit
341d71858c
@ -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<count($return_data['borrower_details']);$i++){
|
||||
// $entity_type = $return_data['borrower_details'][$i]['entity_type'];
|
||||
// if($entity_type != "Individual"){
|
||||
// $temp = $return_data['borrower_details'][$i]['numbers_of_years_business_running'];
|
||||
// }else{
|
||||
// $temp = $return_data['borrower_details'][$i]['numbers_of_years_borrower_in_this_business'];
|
||||
// }
|
||||
// $return_data['borrower_details'][$i]['numbers_of_years_business_running'] = $temp;
|
||||
// unset($return_data['borrower_details'][$i]['numbers_of_years_borrower_in_this_business']);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if($section_id == 3) //get sub product as custom func tion
|
||||
{
|
||||
|
||||
@ -395,8 +413,8 @@ class readexceldata
|
||||
if(isset($return_data['borrower_details'])){
|
||||
$array2 = array_filter($return_data['borrower_details']['numbers_of_years_business_running'], function($a) {return $a !== 'NA';});
|
||||
$array1 = array_filter($return_data['borrower_details']['numbers_of_years_applicant_in_business'], function($a) {return $a !== 'NA';});
|
||||
$return_data['borrower_details']['numbers_of_years_applicant_in_business'] = array_replace_recursive($array1, $array2);
|
||||
}
|
||||
$return_data['borrower_details']['numbers_of_years_business_running'] = array_replace_recursive($array1, $array2);
|
||||
}
|
||||
foreach ($keys as $current_key => $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 );
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user