Hello All,

How can i integrate RSS Feeds with PHP ?

I used following code .

<?php
header("Content-Type: application/rss+xml");

$aData=array();

$aData[0]['title']="test title 1";
$aData[0]['description']="test description 1";

$aData[1]['title']="test title 2";
$aData[1]['description']="test description 2";

$aData[2]['title']="test title 3";
$aData[2]['description']="test description 3";

// Hello Records are not added dynamically.
?>
<rss version="2.0">
<channel>

<title>Name of your site</title>
<description>A description of your site</description>
<link>http://www.test.com</link>
<copyright>Your copyright information</copyright>

<item>
<title>Title 1</title>
<link>http://www.google.com</link>
<description>Description 1</description>
</item>

<item>
<title>Title 2</title>
<link>http://www.google.com</link>
<description>Description 2</description>
</item>

<item>
<title>Title 3</title>
<link>http://www.google.com</link>
<description>Description 3</description>
</item>
<?php

if(is_array($aData) && count($aData) >0)
{
foreach ($aData as $key=>$value)
{
?>
<item>
<title><?=$value['title'];?></title>
<link><?=$key;?></link>
<description><?=$value['description'];?></description>
</item>
<?php
}
}
print $output;
?>
</channel>
</rss>


save this file as rss.php

If we run this file on Internet Explorer then we get list of records with array records also. But, if we run this file in Mozilla then we can't get records from array.

Please help me.

Thanks is advance.