I have this code:
$xml = simplexml_load_file('http://****.ru/?format=feed&type=rss'); echo $xml->title;
And such a var_dump($xml)
:
object(SimpleXMLElement)#1 (2) { ["@attributes"]=> array(1) { ["version"]=> string(3) "2.0" } ["channel"]=> object(SimpleXMLElement)#2 (2) { ["image"]=> object(SimpleXMLElement)#3 (1) { ["url"]=> string(22) "http://*/img.jpg" } ["item"]=> array(20) { [0]=> object(SimpleXMLElement)#4 (6) { ["title"]=> string(12) "Smart Search" ["link"]=> string(48) "http://**/index.php/item/70-smart-search" ["description"]=> string(21) " ..." ["image_item"]=> string(98) "/var/www/user36565/data/www/*.ru/media/k2/items/cache/3749aaa8ee129d7e919bddcc7e09cd36_L.jpg" ["category"]=> string(15) "Utility Modules" ["pubDate"]=> string(31) "Tue, 17 Jan 2012 03:42:36 +0000" } [1]=> object(SimpleXMLElement)#5 (6) { ["title"]=> string(11) "Quick Icons" ["link"]=> string(47) "http://*.ru/index.php/item/69-quick-icons" ["descrip.............
But in the end, the command echo $xml->title;
shows just a white screen
Tell me what's wrong?