how do we extract data from an xml file and display it in php?
Raakesh399 0
Newbie Poster
Recommended Answers
Jump to PostI found a sample XML file by searching. So I wrote a small php code to read it. I hope this example will help you.
<?php // Loading the XML file $xml = simplexml_load_file("books.xml"); echo "<h2>".$xml->getName()."</h2><br />"; foreach($xml->children() as $book) { echo "BOOK : ".$book->attributes()->id."<br />"; echo …
Jump to PostWelcome :)
If you got the answer you wanted, you can mark thread as solved :)
All 8 Replies
niranga 9
Junior Poster
Raakesh399 0
Newbie Poster
niranga 9
Junior Poster
Aniket_1 0
Newbie Poster
Goutam1982 0
Newbie Poster
ramna 0
Newbie Poster
Myktybek 0
Newbie Poster
Andrew_24 0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.