0

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

1
Contributor
1
Reply
2
Views
8 Years
Discussion Span
Last Post by veledrom
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.