Hi,

I created a XML file and trying to write into it. It does write but, without the values from database.
For example code below writes only <Title></Title> without the value. It should be <Title>My name</Title>.

I do echo and the variable is full. Value

........
$xmlFileName="test.xml";
$process=fopen($xmlFileName, 'w');

while ($myArray=mysql_fetch_array($run)) {
  $xmlFile  ="<Title>".$myArray["title"]."</Title>";
}

fwrite($process, $xmlFile);  
fclose($process);
......

Thanks

Sorry, I have put closing tags wrong places. Solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.