I am trying to create a XML document from information extracted from a mysql table. I am using a tutorial to accomplish this
http://www.tonymarston.net/php-mysql/dom.html#a5
what I want to do is to create each element separately, instead of creating them all at once as shown in the tutorial. In order to do that I am trying to place the specific field name into the foreach loop below, any help would be greatly appreciated.
foreach ($row as where fieldname should go => $row['artistname'])
{
$artval = $doc->createTextNode($row['artistname']);
$artval = $chil->appendChild($val);
}