casper_1707 Posted April 17, 2006 Share Posted April 17, 2006 Hi!I want to get news from a RSS. I get the news and i try to display them everyone in his own table.[code]foreach ($rss->item as $item) {echo "<table><tr><td><a href=$item->link>$item->title</a></td></tr>"; echo "<tr><td>$item->description</td></tr></table>"; }[/code] I don't know why, but insteed dispaying for every news a table, i get a table witch includes all the news.My second problem is when i try to get the entire content of the news (wich results on the following of the link).Let's say i have the following:[code] <span class=arttitle>Romania sub ape, episodul 2006</span><br /><span class=artdatetime>14 Aprilie 2006</span><br /><span class=arteditorname>Nicoleta Chiru, Miruna Olteanu</span> <BR><BR> <span class=artdescription>La un an de la inundatiile devastatoare, banatenii se lupta iarasi cu revarsarile raurilor.<br /></span></p><BR> <p><span class=artbody><p>Cele mai multe rauri din tara au depasit cel putin cotele de atentie, hidrologii avertizand ca zona Banatului este in continuare/span>[/code] The example is much longer but i posted just a fragment.How i extract the text between tags?Thanks!PS: Sorry for my english. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.