tags:

views:

92

answers:

1
A: 

The $dom1 variable needs to be set outside of the foreach loop.

i.e.

$dom1 = new DOMDocument("1.0", 'utf-8');
$dom1->formatOutput = true;

foreach($photo as $value) {

     $dom1->appendChild(...);
     ...
}

$xml = $dom1->save();

It's only one record because you're overwriting the $dom1 each time where you have the comment // create doctype

null
You are the greatest, thank you very much.I am whatching this for 2 day now and you in 10 min.Thanks!!!
Plumbum7