I am pretty excited as I am almost there...
Everything works....except the conversion back to XML
if anyone has had experience with this kind of thing....could you look at:
http://www.siren.cc/mySql2xml.php.sit
essentially, the query works, and the array has been properly populated
I am just not sure how to convert it back to XML
basically I have a mutlidimensional array called $category that looks something like:
1 | West Coast Show Reel| 10 | taste | Atticus | Ross
2 | West Coast Show Reel | 7 | yamaha | Chris | Desmond
3 | West Coast Show Reel | 5 | color | Graham | Anderson
field names:
reel.category_id
category.name
reel.spot_id
spot.name
composer.fname
composer.lname
reel is a ' join' table containing: reel.id, reel.category_id, and reel.spot_id...it joins the 'category' and 'spot' tables
category is a table of categories
spots is a table of commercials
Somehow, I need to loop thru the Category Array and print the XML list
I was attempting to put together something like:
/// Create XML to return to the Qt movie
/**
This is what is not working
**/
print '<sirenreels>';
foreach($category as $categoryID => $spotArray)
{
print '<category>';
print '<meta>'.$spotArray['id'].'</meta>';
print '<content>';
foreach($spotArray as $spotInfoArray))
{
print '<spot>';
print '<id>'.$songInfoArray['spot_id'].'</id>';
print '<title>'.$songInfoArray['title'].'</title';
print '<fname>'.$songInfoArray['fname'].'</fname>';
print '<lname>'.$songInfoArray['lname'].'</lname>';
print '</spot>';
}
print '</content>';
print '</category>';
}
print '</sirenreels>';
I know I am close........
I am sure it is some part of the key=>Value stuff that is not translating
many thanks
g