Get data from XML using PHP

Sunday, July 6, 2014

i have simple XML file, like this:

<title>This is the title</title>
<description>Duration : 8 min&lt;br&gt;Url : src=''&gt;&lt;br&gt;&lt;img src=''&gt;&lt;br&gt;&amp;lt;div id=&amp;quot;xv-embed-8324890&amp;quot;&amp;gt;&amp;lt;/div&amp;gt; &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt; (function() { var tn = document.createElement('script'); tn.type = 'text/javascript'; tn.async = true; tn.src = ''; var s = document.getElementById('xv-embed-8324890'); s.parentNode.insertBefore(tn, s); })(); &amp;lt;/script&amp;gt;&lt;br&gt; </description>

I am trying to get each data from it, my try for title looks like:

include 'rss.xml';

$movies = new SimpleXMLElement($xmlstr);

echo $movies->item[0]->title;

But its not really working (it display whole XML file not just title) can somebody help me to solve my problem?

Thanks guys