/ Published in: PHP
Expand |
Embed | Plain Text
<?php $file="http://news.bbc.co.uk/rss/newsonline_world_edition/business/rss.xml <http://news.bbc.co.uk/rss/newsonline_world_edition/business/rss.xml> "; //echo $val; $primarycount="0"; $counter="0"; $count1="0"; ?> <!--<pre>--> <?php //print_r($values); foreach($values as $key=>$val) { foreach($val as $key1=>$val1) { //echo $val1."hjgjhg"; if($key1=="tag") { if($val1=="item") { $primarycount++; if($primarycount%2!=0) { $counter++; $count1=$count1+1; } } //print_r($value); if($val1=="title") { $title[$counter]=$val['value']; //echo "test".$title[$counter]."ok"; } if($val1=="link") { $link[$counter]=$val['value']; $count1=0; } if($val1=="description") { $description[$counter]=$val['value']; $count1++; } } } } ?> <table> <tr> <td> <? for($i=0;$i<count($title);$i++) { ?> <table border="0"> <tr><td class="bdytxt4"><b><?=$title[$i];?></b></td></tr> <tr><td class="bdytxt"><?=$description[$i];?></font></td></tr> <tr><td><a href=http://mail.yahoo.com/config/login?/"<?=$link[$i];?>"><font color="#0099FF">more..</font></a></td></tr> </table> <? } ?> </td> </tr> </table>
You need to login to post a comment.
