//this will get us the individual's data if ($action == 'getIndData') { $check = $_REQUEST['check']; if ($check != 'New Individual') { $line = explode("|| ", $check); $id = $line[2]; $result = array(); $result[] = array_values(get_object_vars($person = Person::getById($id))); $result[] = array_values(get_object_vars($birth = Birth::getById($id))); $result[] = array_values(get_object_vars($death = Death::getById($id))); $result[] = array_values(get_object_vars($burial = Burial::getById($id))); $result[] = array_values(get_object_vars(Place::getById($birth->place))); $result[] = array_values(get_object_vars(Place::getById($death->place))); $result[] = array_values(get_object_vars(Place::getById($burial->place))); $parents = array(); $parent = Parents::getAllParentsById($id); foreach ($parent as $pops) { $temp = array(); $temp[0] = 'parent'; $temp_person = Person::getById($pops->parentId); $temp[1] = "" . $temp_person->lastName . ", " . $temp_person->firstName . " " . $temp_person->middleName . " || Born: " . $temp_person->yearBorn . ", Death: " . $temp_person->yearDead . " || " . $temp_person->id; $parents[] = $temp; } $result[] = $parents; $spouses = array(); $spouse = Spouse::getAllSpousesById($id); foreach ($spouse as $spo) { $temp = array(); $temp[0] = 'spouse'; $temp_spouse = Person::getById($spo->spouse); $temp[1] = "" . $temp_spouse->lastName . ", " . $temp_spouse->firstName . " " . $temp_spouse->middleName . " || Born: " . $temp_spouse->yearBorn . ", Death: " . $temp_spouse->yearDead . " || " . $temp_spouse->id;