Use simplexml_load_file() to read XML data from a file


SUBMITTED BY: henry1874w

DATE: June 21, 2017, 11:54 p.m.

FORMAT: Text only

SIZE: 157 Bytes

HITS: 225

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4. <?php
  5. $xml=simplexml_load_file("note.xml") or die("Error: Cannot create object");
  6. print_r($xml);
  7. ?>
  8. </body>
  9. </html>

comments powered by Disqus