我在这里陷入困境,我成功地从网站返回数据,但随后来自网站的超链接以文本而不是链接的形式返回。我想知道是否有任何方法可以将其作为链接返回。也可以在超链接内显示信息吗?
<div data-role="content">
<div class="content-primary">
<?php
$query = 'http://query.yahooapis.com/v1/public/yql?q=Select%20*%20From%20rss%20where%20url%3D%22http%3A%2F%2Fworldoftanks.com%2Fnews%2Frss%2F%22&diagnostics=true';
$xml = simplexml_load_file($query);
//var_dump($xml);
echo '<h2>World of Tank News</h2>';
//iterate over query result set
$results = $xml->results;
foreach ($results->item as $r){
echo $r->title . "<br />";
echo $r->link . "<br /><br />";
}
?>
</div>