public function export($arr) { $out = '<root>' . "\n"; foreach ($arr as $key => $val) { $out .= '<row>' . "\n" . xml_class::export_small(array($key => $val)) . '</row>' . "\n"; } $out .= '</root>' . "\n"; return $out; }