Question by JTEwv: XML parsing with PHP help?
I am trying to do some VERY simple XML parsing with PHP, and I’ve got the basics from an easy tutorial online, which echoes back to me all the data from the file — every last piece of content within the XML tags — but, I’d like for PHP to be able to organize it into variables (e.g., whatever is in XML tag
This revolves around an XBOX 360 site I’m trying to start.
The code, and what it does, can be seen here:
If anyone could tell me how to split the data up into variables or something that makes sense, that’d be great. Thanks!
Answer by diagnostix
I’m assuming that you are able to access the tag name and the value. I guess the best way I can think of is to compose your data into a querystring format, and then use parse_str() function to make variables out of it.
Know better? Leave your own answer in the comments!
There are no revisions for this post.