just change this section
$xml_output .= "tt<date>" . $row['date'] . "</date>n";
// Escaping illegal characters
$row['text'] = str_replace("&", "&", $row['text']);
$row['text'] = str_replace("<", "<", $row['text']);
$row['text'] = str_replace(">", ">", $row['text']);
$xml_output .= "tt<text>" . $row['text'] . "</text>n";
[/php]