name : 'Unknown Form'; $entries = go_form_get_entries($form_id); header('Content-Type: text/xml; charset=utf-8'); header('Content-Disposition: attachment; filename="go-form-' . sanitize_title($form_name) . '-export-opengoth.xml"'); $output = fopen('php://output', 'w'); fwrite($output, ''); $count = count($entries); foreach ($entries as $i => $e) { $rank = $ranks[$e->rank]; $out = "club\" country=\"$e->country\" egfPin=\"$e->egd_number\" ffgLicence=\"\" ffgLicenceStatus=\"\" firstName=\"$e->first_name\" grade=\"$rank\" name=\"$e->last_name\" participating=\"11111111111111111111\" rank=\"$rank\" rating=\"$e->rating\" ratingOrigin=\"\" registeringStatus=\"PRE\" smmsCorrection=\"0\"/>"; fwrite($output, $out); } fwrite( $output,' [, , , , , ] '); fclose($output);