-1
我試圖讓title
和link
從這個XML飼料:的SimpleXML如何讓飼料
<item>
<title>A title</title>
<link>http://example.com</link>
</item>
這怎麼可能?我是PHP新手,我試圖弄清楚它。這是我迄今爲止所擁有的。
<?php
include 'http://example/forum/index.php?action=.xml;type=rss';
$channel = new SimpleXMLElement($xmlstr);
echo $channel->$item[0]->title;
?>
但它不起作用。
要開始,它的項目不是$ item – 2012-02-16 13:22:59