private function text_encode($stats) { $html = "Statistics for the whole server\n\n"; foreach ($stats as $name => $value) { $html .= "{$name} : {$value}\n"; } $html .= "\n"; return $html; }