Php code generating an XML file Help

Hi PHP gurus,
I have a php code that I found very helpful to generate an xml file.
It get the files from a folder an creates the xml file, but I need to know how can I generate a #CDATA-Section, because this xml file will be used to see images and videos in a 3D carrousel that I have in my website: http://anaheimspanish.net
I also have some weird output but I’ll be happy with one solution at the time.
You can run the php file to see the output: http://anaheimspanish/FLASH_DIR/3D_GALLERY/Videos/Videos/xml_videos.php
This is the php code:

<?php
$myfeed = new RSSFeed();
$myfeed->SetChannel(‘http://anaheimspanish.net/’,
‘This is my web site’,
‘The latest files in my directory’,
‘en-us’,
anaheimspanish.net’,
anaheimspanish.net’,
‘The Latest Files in my Directory’);
// $myfeed->SetImage(‘http://anaheimspanish.net/mylogo.jpg’);
// Open the current directory (or specify it) and grab only .flv files …
$dir = opendir ("./");
while (false !== ($file = readdir($dir))) {
if (strpos($file, ‘.flv’,1)||strpos($file, ‘.flv’,1) ) {
//$myfeed->SetItem(“http://anaheimspanish.net/FLASH_DIR/3D_GALLERY/$file”, “This is the file: $file”, “”);
$myfeed->SetItem(“FLASH_DIR/3D_GALLERY/$file”, “The file is: $file”, “”);
}
}
// Output the XML File … you could write it to the directory instead.
//echo $myfeed->output();
// Write the XML File to a file.
$fp = fopen(‘video_xml.xml’, ‘w’);
fwrite($fp, $myfeed->output());
fclose($fp);
class RSSFeed {
// VARIABLES
// channel vars
var $channel_url;
var $channel_title;
var $channel_description;
var $channel_lang;
var $channel_copyright;
var $channel_date;
var $channel_creator;
var $channel_subject;
// image
var $image_url;
// Items
var $Items = array();
var $nrItems;

// FUNCTIONS
// constructor
function RSSFeed() {
$this->nrItems=0;
$this->channel_url=’’;
$this->channel_title=’’;
$this->channel_description=’’;
$this->channel_lang=’’;
$this->channel_copyright=’’;
$this->channel_date=’’;
$this->channel_creator=’’;
$this->channel_subject=’’;
$this->image_url=’’;
}
// set channel vars
function SetChannel($url, $title, $description, $lang, $copyright, $creator, $subject, $Thumb, $Name, $ToolTips, $Link) {
$this->channel_url=$url;
$this->channel_title=$title;
$this->channel_Description=$Description;
$this->channel_lang=$lang;
$this->channel_copyright=$copyright;
$this->channel_date=date(“Y-m-d”).‘T’.date(“H:i:s”).’+01:00’;
$this->channel_creator=$creator;
$this->channel_subject=$subject;
$this->channel_Thumb=$Thumb;
$this->channel_Name=$Name;
$this->channel_ToolTips=$ToolTips;
$this->channel_Link=$Link;
$this->channel_File=$File;
$this->channel_FileInfo=$FileInfo;

}
// set image
function SetImage($url) {
    $this-&gt;image_url=$url;  
}
// set Item
function SetItem($url, $Description, $Thumb, $Name, $ToolTips, $Link, $File, $FileInfo) {
    $this-&gt;Items[$this-&gt;nrItems]['url']=$url;
    $this-&gt;Items[$this-&gt;nrItems]['Thumb']=$Thumb;
    $this-&gt;Items[$this-&gt;nrItems]['Description']=$Description;
    $this-&gt;Items[$this-&gt;nrItems]['Link']=$URL;
    $this-&gt;Items[$this-&gt;nrItems]['Name']=$Name;
    $this-&gt;Items[$this-&gt;nrItems]['ToolTips']=$ToolTips;
    $this-&gt;Items[$this-&gt;nrItems]['File']=$File;
    $this-&gt;Items[$this-&gt;nrItems]['FileInfo']=$FileInfo;
    $this-&gt;nrItems++;   
}
// output feed
function Output() {
    $output =  '&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;'."

“;
$output .= '<rdf:RDF xmlns:rdf=“http://www.w3.org/1999/02/22-rdf-syntax-ns#” xmlns=“http://purl.org/rss/1.0/” xmlns:slash=“http://purl.org/rss/1.0/modules/slash/” xmlns:taxo=“http://purl.org/rss/1.0/modules/taxonomy/” xmlns:dc=“http://purl.org/dc/elements/1.1/” xmlns:syn=“http://purl.org/rss/1.0/modules/syndication/” xmlns:admin=“http://webns.net/mvcb/” xmlns:feedburner=”[URL=“http://rssnamespace.org/feedburner/ext/1.0&quot;&gt;’.&quot; “]http://rssnamespace.org/feedburner/ext/1.0">’."
“;
$output .= '<channel rdf:about=”’.$this->channel_url.’”>’.”
“;
$output .= ‘<Title>’.$this->channel_Title.’</Title>’.”
“;
$output .= ‘<Link>’.$this->channel_url.’</Link>’.”
“;
$output .= ‘<Description>’.$this->channel_Description.’</Description>’.”
“;
$output .= ‘<dc:language>’.$this->channel_lang.’</dc:language>’.”
“;
$output .= ‘<dc:rights>’.$this->channel_copyright.’</dc:rights>’.”
“;
$output .= ‘<dc:date>’.$this->channel_date.’</dc:date>’.”
“;
$output .= ‘<dc:creator>’.$this->channel_creator.’</dc:creator>’.”
“;
$output .= ‘<dc:subject>’.$this->channel_subject.’</dc:subject>’.”
“;
$output .= ‘<Items>’.”
“;
$output .= ‘<rdf:Seq>’;
for($k=0; $k<$this->nrItems; $k++) {
$output .= '<rdf:li rdf:resource=”’.$this->Items[$k][‘url’].’"/>’."
“;
};
$output .= ‘</rdf:Seq>’.”
“;
$output .= ‘</Items>’.”
“;
$output .= '<video rdf:resource=”’.$this->video_url.’"/>’."
“;
$output .= ‘</channel>’.”
“;
for($k=0; $k<$this->nrItems; $k++) {
$output .= '<Item rdf:about=”’.$this->Items[$k][‘url’].’">’."
“;
$output .= '<Thumb Location=”’.$this->Items[$k][‘Thumb’].’"></Thumb>’."
“;
$output .= '<Link URL=”’.$this->Items[$k][‘url’].’">.</Link>’."
“;
$output .= ‘<Description>’.$this->Items[$k][‘Description’].’</Description>’.”
“;
$output .= ‘<File Type=“video” Length=“6”>’.$this->Items[$k][‘File’].’</File>’.”
“;
$output .= ‘<FileInfo>’.$this->Items[$k][‘FileInfo’].’</FileInfo>’.”
“;
$output .= ‘<Name’.$this->Items[$k][‘Name’].’></Name>’.”
“;
$output .= ‘<ToolTips cdata=“this is the info I want”>’.$this->Items[$k][‘ToolTips’].’”></ToolTips>’."
“;
$output .= ‘</Item>’.”
“;
};
$output .= ‘</rdf:RDF>’.”
";
return $output;
}
};
?>

AND THIS IS THE OUTPUT I GET:(see the attached snap picture php_xml.png

As you can see the tag for ToolTips cdata is in red which is an attribute, but I need it as #cdata-section.
How can I get this done?
What am I missing in my output?
If this code is to complicated I would like to know as well that. If there’s another option. I’ll be happy to try.
Thanks for you time and help.