Forum Moderators: coopster
Here is the code for my PHP:
<?php
// read rss feed and echo html list of news links
function Parse () {
$filename = "/home/williamc/public_html/xml/rss_feed.xml"; // finds the file
$openfile = file ($filename, "r"); // open file
$openfile = implode ("/n",$openfile);
$parsed = explode ("<item>", $openfile);
foreach ($parsed as $parts) {
$title = explode ("<title>", $value);
$title = preg_replace ("</title>","</h3>",$title);
}
}
Parse();
?>
As you can see, it's not complete!
How can I rewrite each RSS item? I thought that if I explode at the '<item>' tag and then add a loop that it would work, but all i get is:
Array
(
[0] =>
)
Array
(
[0] =>
)
Array
(
[0] =>
)
Array
(
[0] =>
)
Any help would be very appreciated! :D