How do I read the simpleXML object in php? -


 <?php[![enter image description here][1]][1]   $try = simplexml_load_file("https://www.theguardian.com/football/series/footballweekly/podcast.xml") ;   echo "<pre>" ;   print_r($try) ;   echo "</pre>" ;  

then try echo $try->language or $try->item[0]->titel. nothing shows, how can access object?

you're missing out 1 level of xml:

$try->channel->language $try->channel->item[0]->title 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -