Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Get node values of specific elements
SUBMITTED BY:
henry1874w
DATE:
June 21, 2017, 11:56 p.m.
FORMAT:
Text only
SIZE:
208 Bytes
Raw
Download
Tweet
HITS:
246
Go to comments
Report
<!DOCTYPE html>
<html>
<body>
<?php
$xml=simplexml_load_file("books.xml") or die("Error: Cannot create object");
echo $xml->book[0]->title . "<br>";
echo $xml->book[1]->title;
?>
</body>
</html>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus