please someone help me?
I export products from the database via PHP to XML. I'm using this code for that(short code):
PHP:
$my_file = "xml/my_xml_file.xml";
$fh = fopen($myFile, 'w');
while($new_query = mysqli_fetch_assoc($query)) {
$xml_file .= '<ELEMENT1>'.$new_query['element_data_text'].'</ELEMENT1>'.PHP_EOL;
}
fwrite($fh, $xml_file);
fclose($fh);
The code runs and saves a file in which I can see all the elements in order. The above mentioned element looks like this:
XML:
<ELEMENT1>Consulted disposing to moonlight ye extremity. Engage piqued in on coming. </ELEMENT1>
The problem occurs when I import XML into my customer's application. The application will return an error:
Bad data type of parameter [ELEMENT1], expected string, received object.