Good day XML Gurus,

I have a very annoying problem. So I have a php function that quries the database and builds an concatonates a string of xml.

PHP Code:
function getXMLOffer($number) {
    $sql = "select shoeID, shoeName, brandName, price from shoe_specialOffers, brand where shoeID=$number AND shoe_specialOffers.brandID = brand.brandID";
    $xmlHeader = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
    
$rsOffer mysql_query$sql );
    
// start to assemble an output string with the xml head and root element
    
$output $xmlHeader;
    
$output .= "<root>\n";
    while ( 
$record mysql_fetch_assoc$rsOffer ) ) {
        
// start a new record element in xml and add to the output
        
$output .= "\t<offer>\n";
        
// iterate through each record pulling out the fieldname and its value
        
foreach ( $record as $field => $value ) {
            
$value htmlspecialchars$value );
            
// wrap up the fields and values as xml
            
$output .= "\t\t<$field>$value</$field>\n";
        }
        
$output .= "\t</offer>\n";
    }
    
$output .= "</root>";
    return 
$output;
}
If I call thins functions it returns and XML but there are 3 blank lines at the top of the source code which I cannot figure out where they come from. I've removed lines from the dbConn.php file and I've just lost the will to live

If I look at the content using firebug (firefox) i can see that at the begining there are "\r\n\r\n\r\n" characters. How do they get there???

Thanks in advance

FlYnN