I have the following code which runs a query on an XML file and returns the results. I then sort it using usort. (my sort functions are on a seperate page sort.php). I have commented out the usort for now but the usort function works as its intended to.
$xml = simplexml_load_file($url);
//RUN QUERY ON XML
$xQuery = $xml->xpath($query);
//DISPLAY RESULTS OF QUERY
$i = 0;
//usort($xQuery, 'sortMake');
for ($f = 0; $f <= 9; $f++) {
?>
<img src= "<?php echo $xQuery[$i]->MainPhoto;?>"><br />
MAKE: <?php echo $xQuery[$i]->Make;?><br />
Model: <?php echo $xQuery[$i]->Model;?><br />
$i++;
<?php } ?>
So the above code would display all the content unsorted. I would like to have a sort link before the loop that when clicked would sort the array and display it without reloading the entire page. I know its probably something with AJAX but all of the AJAX resources I have found are all examples of functions that use MySQL. I am not using MySQL.
Any help would be appreciated. Thanks.