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\"?>\n";
$xml_output .= "<gallery>\n";


$xml_output .= "<category caption='RECENT WORK'>\n";

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 .= '<img src="../admin/main/' . $row['largePicture'] . '"caption="' . $row['name'] . '"comment="' . $row['shortDescription'] .'"/>';
$xml_output .= "<description>\n";
$xml_output .= "<![CDATA[
<p lign='justify'><font face='Tahoma' size='11' color='#707070'>". $row['shortDescription']. "</font></p>\n";
$xml_output .= "]]>\n";
$xml_output .= "</description>\n";
}
$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