I have never been quite able to get the hang of anything to do with XML, so hopefully you can help me and clear up any misinformation I might have.
I have a document like this. I don't think it's true XML but I am not sure it makes a difference in PHP.
<user>
<firstName>John</firstname>
<lastName>Doe</lastname>
<email>john.doe AT netscape.net</email>
</user>
<user>
<firstName>Jane</firstname>
<lastName>Doe</lastname>
<email>jane.doe AT hotmail.com</email>
</user>
...
You get the idea. What I need is some code that will create $array, whose keys are numbers. Each value of $array is another array, whose keys are the XML tags (in this case, firstName and lastName and email) and whose values are the values of the XML. For this example, my array would be
Array
(
[0] => Array
(
[firstName] => John
[lastName] => Doe
[email] => john.doe AT netscape.net
)
[1] => Array
(
[firstName] => Jane
[lastName] => Doe
[email] => jane.doe AT hotmail.com
)
)
Of course the actual "XML" files have not been written yet, so this system is flexible to whatever PHP might be necessary. Thanks in advance.