|
-
Jan 23rd, 2010, 11:40 AM
#2
Re: Reading XML
When you use simplexml_load_file(), the variable that you load it into ($xml, in your case) becomes synonymous with the root element of your XML. So in your foreach loop, what you want is the element <link> which is under root element <links> - "$xml->link->links" is not specifying this. Change to "$xml->link".
Make sense?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|