Hi,
I have a PHP file that gets an XML files from a HTML form. The PHP files needs to generate a new HTML file containing a table with the the data retrived from the XML file. I was able to this this properly (using expat). However, before adding the data to the table, I would need to sort the data based on one of the XML elements in my file. This is where my problem begins. I'm trying to build an array from by XML file using the following code:
$xmlFile = $_GET["xmlFile"];
$p = xml_parser_create();
xml_parse_into_struct($p, $xmlFile, $vals, $index);
xml_parser_free($p);
echo "First array <br>";
print_r($vals);
echo "<br>Second Array<br>";
print_r($index);
However, both $vals and $index are empty! Any suggestions on what is wrong and how to fix it? I'm fairly new to PHP.