Main Idea: Using Simple XML I want to be able to group my data based upon one of the attributes.
An example of my data set up (simplified):
[Entry]
[Entry Id]1[/Entry Id]
[Field 1]First Name[/Field 1]
[Field 2]Last Name[/Field 2]
[Field 3]Grade[/Field 3]
[/Entry]
Taking the above example I am currently using SimpleXML to search for one grade (ie 8th) and then listing each entry's Name below it giving me something like:
**8th Grade**
Jon Doe
Jane Smith
And so on. The only problem with this is I am creating a "foreach" statement for each grade I want to display.
I believe there has to be a way to just have one statement that spits out the names of each person grouped by grade without having to go in each time I want to add a new grade and manually typing a "foreach" statement.
I am a total newb at PHP so any examples or explanations you can give would be hugely helpful.