Why won't this &@!#%$ work?

im trying to write nodes to an existing xml file by using the following excerpt from my php script but when i run it, the new item just replaces the previous one instead of appending it!?!?!


$write_string .= "<items>";
foreach($items_final as $item){
 $write_string .= "<item>";
 $write_string .= "<artist>".$item[artist]."</artist>
";
 $write_string .= "<year>".$item[year]."</year>
";
 $write_string .= "<image>".$item[image]."</image>
";
 $write_string .= "</item>";
}
$write_string .= "</items>";

and heres the subsequent output:


<items>
-<item>
  <artist>fadfasdf</artist> 
  <year>gsdfgsdfsdf</year> 
  <image>werewrewr</image> 
 </item>
-<item>
  <artist /> 
  <year /> 
  <image /> 
 </item>
-<item>
  <artist /> 
  <year /> 
  <image /> 
 </item>
-<item>
  <artist /> 
  <year /> 
  <image /> 
 </item>
</items>

always adding three empty items to the end even after only submitting the form once! theres tons of xml attributes info on this forum but does anybody know how to write xml nodes in php? help!!