Before I start I would like to say I am a noob at reading XML into PHP but I have so far managed to load XML and display the data onto a PHP page. My next test is to group items.
Here is an XML snippet:
<MailboxDatabases>
<MailboxDatabase>
<DatabaseName>DB01</DatabaseName>
<Status>Healthy</Status>
<MailboxServer>MB08</MailboxServer>
<ActiveDatabaseCopy>mb07</ActiveDatabaseCopy>
<ActivationSuspended>False</ActivationSuspended>
<SinglePageRestore>0</SinglePageRestore>
<ContentIndexState>Healthy</ContentIndexState>
<Active>false</Active>
</MailboxDatabase>
<MailboxDatabase>
<DatabaseName>DB01</DatabaseName>
<Status>Healthy</Status>
<MailboxServer>MB07</MailboxServer>
<ActiveDatabaseCopy>mb07</ActiveDatabaseCopy>
<ActivationSuspended>False</ActivationSuspended>
<SinglePageRestore>0</SinglePageRestore>
<ContentIndexState>Healthy</ContentIndexState>
<Active>true</Active>
</MailboxDatabase>
<MailboxDatabases>
<MailboxDatabase>
<DatabaseName>DB02</DatabaseName>
<Status>Healthy</Status>
<MailboxServer>MB08</MailboxServer>
<ActiveDatabaseCopy>mb07</ActiveDatabaseCopy>
<ActivationSuspended>False</ActivationSuspended>
<SinglePageRestore>0</SinglePageRestore>
<ContentIndexState>Healthy</ContentIndexState>
<Active>true</Active>
</MailboxDatabase>
<MailboxDatabase>
<DatabaseName>DB02</DatabaseName>
<Status>Healthy</Status>
<MailboxServer>MB07</MailboxServer>
<ActiveDatabaseCopy>mb07</ActiveDatabaseCopy>
<ActivationSuspended>False</ActivationSuspended>
<SinglePageRestore>0</SinglePageRestore>
<ContentIndexState>Healthy</ContentIndexState>
<Active>false</Active>
</MailboxDatabase>
</MailboxDatabases>
As you can see, "DatabaseName" is the same in two items but "Active" is different. What I want to do is display the above xml in php like
DB01 - MB08 - false | DB01 - MB07 - true
DB02 - MB08 - true | DB01 - MB07 - false
using the following elements (database) - (Mailboxserver) - (active) | ...
Please could someone give me a hand and also please try to explain the code.