UPDATE: I\'ve reworked the question, to show progress I\'ve made, and maybe make it easier to answer.
UPDATE 2: I\'ve added another value to the XML. Extension avail
You can try this:
$scrape_xml = "files.xml";
$xml = simplexml_load_file($scrape_xml);
$group = array();
foreach ($xml->Item as $file)
{
$platform = stripslashes($file->Platform);
$name = stripslashes($file->Name);
$title = stripslashes($file->Title);
$downloadPath = stripslashes($file->DownloadPath);
if(!isset($group[$platform]))
{
$group[$platform] = array();
$group[$platform][] = array("Name" => $name,"Title" => $title, "Files" => array($downloadPath));
}
else
{
$found = false;
for($i=0;$i $name,"Title" => $title, "Files" => array($downloadPath));
}
}
}
echo "".print_r($group,true)."
";