hocineyahiaoui

PHP SimpleXML - Read From String

Jan 20th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. PHP SimpleXML - Read From String
  2.  
  3. The PHP simplexml_load_string() function is used to read XML data from a string.
  4.  
  5. Assume we have a variable that contains XML data, like this:
  6.  
  7.  
  8. $myXMLData =
  9. "<?xml version='1.0' encoding='UTF-8'?>
  10.  <note>
  11.  <to>Tove</to>
  12.  <from>Jani</from>
  13.  <heading>Reminder</heading>
  14.  <body>Don't forget me this weekend!</body>
  15.  </note>";
  16.  
  17. The example below shows how to use the simplexml_load_string() function to read XML data from a string:
  18. Download her :: http://cut-bit.cf/c1rMjmES
Advertisement
Add Comment
Please, Sign In to add comment