key cahnges : ps
This commit is contained in:
parent
88c3a64950
commit
341d71858c
@ -85,6 +85,24 @@ class readexceldata
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// 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
|
if($section_id == 3) //get sub product as custom func tion
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -395,7 +413,7 @@ class readexceldata
|
|||||||
if(isset($return_data['borrower_details'])){
|
if(isset($return_data['borrower_details'])){
|
||||||
$array2 = array_filter($return_data['borrower_details']['numbers_of_years_business_running'], function($a) {return $a !== 'NA';});
|
$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';});
|
$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)
|
foreach ($keys as $current_key => $arr)
|
||||||
{
|
{
|
||||||
@ -520,17 +538,16 @@ class readexceldata
|
|||||||
return $company;
|
return $company;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public static function change_key( $array, $old_key, $new_key) {
|
public static function change_key( $array, $old_key, $new_key) {
|
||||||
// echo "line at 545";
|
echo "line at 545";
|
||||||
// // print_r($array);
|
if( ! array_key_exists( $old_key, $array[0] ) )
|
||||||
// if( ! array_key_exists( $old_key, $array[0] ) )
|
return $array;
|
||||||
// return $array;
|
|
||||||
|
|
||||||
// print_r(array_keys($array[0]));
|
print_r(array_keys($array[0]));
|
||||||
// // print_r($keys);die();
|
// print_r($keys);die();
|
||||||
// $keys[ array_search( $old_key, $keys ) ] = $new_key;
|
$keys[ array_search( $old_key, $keys ) ] = $new_key;
|
||||||
// print_r(array_combine( $keys, $array[0] ));
|
print_r(array_combine( $keys, $array[0] ));
|
||||||
// // return array_combine( $keys, $array );
|
// return array_combine( $keys, $array );
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in New Issue
Block a user