I would like to produce the following xml document from PHP
<slideshow>
<photo url=“DO NOT DELETE ME” day= “6” month= “FEBRUARY” description=“Current Day Description” />
<photo url=“DO NOT DELETE ME” day= “7” month= “FEBRUARY” description=“Day 2 Description” />
<photo url=“DO NOT DELETE ME” day= “8” month= “FEBRUARY” description=“Day 3 Description” />
<photo url=“DO NOT DELETE ME” day= “9” month= “FEBRUARY” description=“Day 4 Description” />
<photo url=“DO NOT DELETE ME” day= “10” month= “FEBRUARY” description=“Day 5 Description” />
<photo url=“DO NOT DELETE ME” day= “11” month= “FEBRUARY” description=“Day 6 Description” />
<photo url=“DO NOT DELETE ME” day= “12” month= “FEBRUARY” description=“Day 7 Description” />
</slideshow>
Here is the PHP that I have
$xml_output = "<?xml version=“1.0”?>
";
$xml_output .= "<slideshow>
";
foreach($result as $row) {
$xml_output .= " <month =\"".$row['eventStartDate'] ."\" />
“;
$xml_output .= " <day =”".$row[‘eventEndDate’] ."" />
“;
$xml_output .= " <description =”".$row[‘eventSummary’] ."" />
";
// Escaping illegal characters
$row['imagedesc'] = str_replace("&", "&", $row['imagedesc']);
$row['imagedesc'] = str_replace("<", "<", $row['imagedesc']);
$row['imagedesc'] = str_replace(">", ">", $row['imagedesc']);
$row['imagedesc'] = str_replace("\"", """, $row['imagedesc']);
}
$xml_output .= “<slideshow>”;
echo $xml_output;