Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $data_adult;
- if(isset($adult_name)){
- if(count($adult_name) > 0){
- foreach($adult_name as $k => $a){
- $data_adult['adult'][$k]['name'] = $adult_name[$k];
- $data_adult['adult'][$k]['phone'] = $phone[$k];
- $data_adult['adult'][$k]['idNumber'] = $adult_id_number[$k];
- $data_adult['adult'][$k]['birthdate'] = $adult_birthdate[$k];
- }
- $data['passengers'] .= json_encode($data_adult);
- }
- }
- $data_child;
- if(isset($child_name)){
- if(count($child_name) > 0){
- for($k = 0; $k<count($child_name); $k++) {
- $data_child['children'][$k]['name'] = $child_name[$k];
- $data_child['children'][$k]['birthdate'] = $child_birthdate[$k];
- }
- $data['passengers'] .= json_encode($data_child);
- }
- }
- $data_infrant = [];
- if(isset($infrant_name)){
- if(count($infrant_name) > 0){
- foreach($infrant_name as $k => $a){
- $data_infrant["infants"][$k]['name'] = $infrant_name[$k];
- $data_infrant['infants'][$k]['birthdate'] = $infrant_birthdate[$k];
- }
- $data['passengers'] .= json_encode($data_infrant);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement