Jump to content

vicisus_tech

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

vicisus_tech's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am trying to sort these fields alphabetically by $name - $documents have run past multiple sort methods but none seem to work. I was hoping someone here knew an easy method to do this xml data: <database> <name>Test</name> <documents>0</documents> <sections>0</sections> </database> <database> <name>Test2</name> <documents>100</documents> <sections>0</sections> </database> current code: <?php $request_url = "http://10.100.100.100:9000/a=getstatus"; $xml = simplexml_load_file($request_url) or die("feed not loading"); echo "<table width=\"300\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\n"; echo " <tr>\n"; echo " <td>Thor Databases</td>\n"; echo " <td>Count\n"; echo $xml->responsedata->databases->num_databases; echo " </td>\n"; echo " </tr>\n"; foreach ($xml->responsedata->databases->database as $db) { echo"<tr><td>",$db->name,"</td><td>",$db->documents,"</td></tr>\n"; } echo "</table>\n"; ?> Thanks, E
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.