https://www.w3schools.com/php/php_xml_simplexml_read.asp - The PHP simplexml_load_string() function is used to read XML data from a string. - The PHP simplexml_load_file() function is used to read XML data from a file. Everyday Italian Giada De Laurentiis 2005 30.00 Harry Potter J K. Rowling 2005 29.99 XQuery Kick Start James McGovern 2003 49.99 Learning XML Erik T. Ray 2003 39.95 "; $xml=simplexml_load_string("$myXMLData") or die("Error: Cannot create object"); foreach($xml->children() as $books) { echo $books->title . ", "; echo $books->author . ", "; echo $books->year . ", "; echo '€'.$books->price . "
"; } ?> https://www.mrw.it/php/parsing-xml-php-simplexml_7085.html https://code.tutsplus.com/tutorials/parse-xml-to-an-array-in-php-with-simplexml--cms-35529