Output XHML with PHP

Hi folks,
using the tutorial on this web site I have managed to get most of the script to work but I am stuck with a pair of brackets. Can anyone point out where I am going wrong. Here is my code

$query = “SELECT idno, name, shortDescription, largePicture, location, thumbnails, exhibition FROM nixSculptures WHERE exhibition = ‘no’ AND location = ‘Recent’ ORDER BY nixSculptures.idno DESC”;
$resultID = mysql_query($query, $linkID) or die(“Data not found.”);
$xml_output = "<?xml version=“1.0”?>
";
$xml_output .= "<gallery>
";

$xml_output .= "<category caption=‘RECENT WORK’>
";

for($x = 0 ; $x < mysql_num_rows($resultID) ; $x++){
$row = mysql_fetch_assoc($resultID);
$row[‘shortDescription’] = str_replace("&", “”, $row[‘shortDescription’]);
$row[‘shortDescription’] = str_replace("<", “”, $row[‘shortDescription’]);
$row[‘shortDescription’] = str_replace(">", “”, $row[‘shortDescription’]);
$row[‘shortDescription’] = str_replace(""", “”, $row[‘shortDescription’]);

$xml_output .= '&lt;img src="../admin/main/' . $row['largePicture'] . '"caption="' . $row['name'] . '"comment="' . $row['shortDescription'] .'"/&gt;';
$xml_output .= "&lt;description&gt;

";
$xml_output .= “<![CDATA[
<p lign=‘justify’><font face=‘Tahoma’ size=‘11’ color=’#707070’>”. $row[‘shortDescription’]. "</font></p>
";
$xml_output .= "]]>
";
$xml_output .= "</description>
";
}
$xml_output .= “</category>”;
$xml_output .= “</gallery>”;

echo $xml_output;

Its is the closing ]] that I believe are causing me problems. See http://www.nicolahenshaw.co.uk/test/gallery2.php for the result - the brackets are visible on the page and the closing tag and obviously shouldn’t be. Many thanks